Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Test to see if a form is already open?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00897108
Message ID:
00897119
Vues:
20
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform