Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Can I get Top-Level Form Name?
Message
From
08/08/2003 15:03:19
 
 
To
07/08/2003 09:07:42
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00817434
Message ID:
00818376
Views:
31
Thought I would point out wparent().
It seems to be just what I'm looking for.

>If every form has a property to hold the value of 'calledby' and the init of every form captures this value passed to it from the calling form and stores it in its 'calledby' property, checking the form's 'calledby' property will always give you the calling form. You could also create a _screen property for each form at the beginning of the app or when the form is called by the parent if the property does not already exist and before calling the childform, store the value of the calling form there and then every form (if only allowed to run once and not multiple instances) could check that value. You would have to empty that value or replace it with null when the form is closed. Otherwise an array as has been recommended would work.
>
>
>
>>>Pass the name of the parent form to the child when it is called:
>>>
>>>
>>>DO childform WITH ThisForm.Name
>>>
>>>
>>>>Is there any way a Child form can get the name of the Top-Level form it is opened in?
>>>>
>>>>TIA
>>
>>I have a container class that has a control that launches a Child Form. The container will probably be on a Child Form itself. The original top-level form can pass itself to the 1st Child Form, but trying to keep track of it all the way down to the control makes for a complicated class.
Bill Morris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform