Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Karben Selim Mejia
  Where is Karben Selim Mejia?
 San Pedro Sula
 Karben Selim Mejia
 To: Dale Dedoroy
  Where is Dale Dedoroy?
 Bacolod City, Negros Occidental
 Dale Dedoroy
Subject: Just adding a little bit to Dale's
Thread ID: 16197 Message ID: 16261 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Monday, October 14, 2002 5:51:44 PM         

> > Dear Friends,
> >
> > I have created an application for a trading concern and used the system menu (menu mymenu bar at line 0) for Menus. Application contains a number of data entry forms. Using the menu, user can open forms for data entry. As the menu is accessible after opening any form, there is a chance to open again a form which was already opened. I have prevented this by using "set skip of " command in each and every form.
> >
> > Now, Is there any method to find a form is already opened or not ?
> >
> > If there is a method to find the same, we can redirect the user to the opened form instead of reopening the form again.
> >
> >
> > Thanking you in advance:
> > Vyas kumar R.
> > vyaskumar@hotmail.com
> >
> > Ex-Webboard members forum.
> Hi,
> Try this:
> If WExist(FormCaption)
> Activate Window (FormName) Normal
> Else
> Do Form FormName
> EndIf
> HTH.
> Dale

*:In the Init Event of your form
with _screen
	for lnI = 1 to .formCount
		do case
			case .forms[lnI].name = this.name and .forms[lnI].visible
			* Found another form with same name and it is visible...
			case .forms[lnI].name = this.name and NOT .forms[lnI].visible
			* form exists but it's invisible so make it visible.
			.forms[lnI].visible = .T.

Karben Selim Mejia

I always have the last word in my home, "Yes sweet heart, what ever you say"

Honduras, Central America
The very center of the world


REOpening a form when it is active/already oepend Posted by Vyas Kumar R @ 10/11/2002 6:58:23 AM
RE: REOpening a form when it is active/already ... Posted by Dale Dedoroy @ 10/11/2002 9:21:16 AM
Thanks to Mr. Dale Posted by Vyas Kumar R @ 10/12/2002 6:34:12 AM
Just adding a little bit to Dale's Posted by Karben Selim Mejia @ 10/14/2002 5:51:44 PM
Thanks to Mr. Karben Selim Mejia. Posted by Vyas Kumar R @ 10/16/2002 6:32:35 AM