Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Can I get Top-Level Form Name?
Message
From
11/08/2003 16:32:22
 
 
To
09/08/2003 17:09:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00817434
Message ID:
00819146
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform