Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test to see if a form is already open?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00897108
Message ID:
00897119
Views:
19
>Is there a command to see if a form is already open? I have an application with a form displaying instructions that can be opened multiple times if a user selects it multiple times from a menu, and this is not desired.


You can do it by the following .

For example your form name is InstForm

Create a function in the Main.prg or add it in your Functions prg file like this
Public goInstructions

FUNCTION IsInstructions()
	RETURN vartype(goInstructions)='O' AND !ISNULL(goInstructions)
ENDFUNC 
In your mainmenu your command to run that form should be like this
do form Project Folder\forms\InstForm name goInstructions
Check/click on Option and in Prompt Option Dialog -> Skip For enter the function name like this
IsInstructions()
Save and run it

I am using this way and it is working fine with me.

Regards,
Zaheer
Previous
Reply
Map
View

Click here to load this message in the networking platform