Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Can I get Top-Level Form Name?
Message
From
07/08/2003 09:07:42
 
 
To
06/08/2003 18:45:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00817434
Message ID:
00817669
Views:
18
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.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform