Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use _SCREEN
Message
 
À
18/12/2002 13:35:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00734188
Message ID:
00734199
Vues:
15
Hi,

>NEWBIE.
no problem :)

The most generic way would be to scan the _SCREEN.Forms collection and compare the names of the forms with the name you're looking for:
LOCAL loFoundForm, loForm
loFoundForm = .NULL.

FOR EACH loFORM IN _SCREEN.Forms
  IF UPPER(loForm.Name) == "MYFORMNAME"
     loFoundForm = loForm
     EXIT
  ENDIF
ENDFOR

IF NOT ISNULL(loFoundForm)
  *-- loFoundForm contains a reference to the found form
ENDIF
You can place this code in global form manager class, so you don't need to have that code in every place you need it.

HTH,
Armin

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform