Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I Prevent Multiple Instances Of The Same Form
Message
From
20/08/1999 06:01:00
Ilie Tomac
Eagle Investment Systems LLC
Boston, Massachusetts, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00255528
Message ID:
00255746
Views:
19
Hi, Doug
Try using _SCREEN object:

LOCAL lFormExists
lFormExists=.f.
FOR i=1 to _SCREEN.FormCount
IF _SCREEN.Forms[i].Name='_Your_Form_Name_'
_SCREEN.Forms[i].ZOrder(0)
lFormExists=.t.
EXIT
ENDIF
ENDFOR
IF ! lFormExists
DO FORM _Your_Form_Name_
ENDIF

BTW, instead of "_SCREEN.Forms[i].Name='_Your_Form_Name_'" you
can use "_SCREEN.Forms[i].Caption='_Your_Form_Caption_'" or any
other property of form.

All the best.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform