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

Probably an idiotic question - I'm trying to do some work in my newly acquired VFP9, having done very little other than FPW26 programming this year - my feeble VFP skills are very rusty...

I have a form called hugform (the name is "hugform" and the scx is "hugform.scx"), which can behave in various ways depending on the setting of a global variable. How can I tell whether an instance of this form is already open when a menu item is selected, so that I can ensure the existing instance is released?

This doesn't work:
IF VARTYPE(HUGForm) <> "O"	&& ie object HUGform  exists
        RELEASE hugform         && close current instance
	DO FORM hugform.scx     && reopen new instance
ELSE
	DO FORM hugform.scx
endif
vartype(hugform) never seems to be able to "see" hugform.

Any help gratedully received!

John
Dr. JW Faithfull
Curator in Geology
Hunterian Museum
University of Glasgow
Glasgow G12 8QQ
Scotland
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform