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

Click here to load this message in the networking platform