Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect if a form is already open?
Message
 
À
04/12/2005 12:45:53
John Faithfull
Hunterian Museum, University of Glasgow,
Glasgow, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Novell 5.x
Database:
Visual FoxPro
Divers
Thread ID:
01074732
Message ID:
01074783
Vues:
19
My Solution,

1-give form name to the form with the same scx name for form

2-cerate property on the form named IsUnique with default value .T.

3-put below codes to the form load method
Local x,nFormCount
nFormCount=0
If This.IsUnique
	For x=1 To _Screen.FormCount
		If _Screen.Forms(x).Name==This.Name
			nFormCount=nFormCount+1
		Endif
		If nFormCount>1
			_Screen.Forms(x).Show() 
			Return .F.
		Endif
	Next
Endif
HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform