Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Can I get Top-Level Form Name?
Message
De
11/08/2003 16:32:22
 
 
À
09/08/2003 17:09:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00817434
Message ID:
00819146
Vues:
21
Hi Marcia,
Bruce says that the W***() functions are not OOP. He says that they are a throwback to before OOP and should not be used. I'm trying to find out why people don't think W***() functions are not OOP.
Can you help shed some light.


>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
Bill Morris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform