Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Can I get Top-Level Form Name?
Message
De
09/08/2003 17:09:36
 
 
À
06/08/2003 14:55:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00817434
Message ID:
00818623
Vues:
19
Hi Bill.

Is there any way a Child form can get the name of the Top-Level form it is opened in?

An O-O alternative to WPARENT() is to add a property to your Application object if you are using one or to _Screen if you are not (_Screen is still available even if it is not visible ) like this in the Init() of your top level form:
IF NOT PEMSTATUS( _Screen, 'oMainForm', 5 )
  _Screen.AddProperty( 'oMainForm' )
ENDIF
_Screen.oMainForm = This
And don't forget to set _Screen.oMainForm = .NULL. in the Release() of the top level form.

This way, anyone can get a reference to the TLF using _Screen.oMainForm.

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

Click here to load this message in the networking platform