Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check for an existance of a form?
Message
De
09/06/1998 17:26:40
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
À
09/06/1998 17:14:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00106485
Message ID:
00106490
Vues:
27
>Is there a way to check to see if a form exists, and if it is shown?
use something called the _SCREEN object.
There is an array property of the _SCREEN object that you can use to find out whether or not a particular form exists called Forms.

So a statement like _SCREEN.Forms[1].Name would give you the name of the "first" form that is inside the main foxpro window.

_SCREEN.FormCount gives the total number of forms.

If you know the Name or Caption or something about the form you are looking for you can find it using a FOR loop and _SCREEN.FormCount and _SCREEN.Forms[i]

Total=_SCREEN.Formcount

FOR i = 1 TO Total
IF _SCREEN.Forms[i].Name="FormIMLookingFor"



ENDIF
ENDFOR

HTH
Dave
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform