Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent opening a form if it's already opened.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00557131
Message ID:
00557403
Vues:
10
Elgin,

You might try to scan the list of forms already running and compare to the name of the current form you are loading...

Copy what you need from the function below I sometimes use...
FUNCTION DOFORM(cformname)
* procedure to start all forms that could be called more than once
* to prevent running multiple copies of the same form
LOCAL x, nform
nform = 0
* scan the forms on the screen
For x = 1 to _screen.formcount
	* formname is case sensitive and will be the name of the form
	If _screen.forms(x).name = (cformname)
		nform = x
	EndIf
Next
If nform > 0
	* just show it
	_screen.forms(nform).show
Else
	* run it
	Do Form (cformname)
EndIf
RETURN .t.
Maybe put the for/next loop in the load of your form class.
Just a suggestion.
Ron Seidl
Independent Developer
VFP

"I'm playing in life's theater in anticipation of a great cast party!"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform