Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing prperties of other forms.
Message
From
20/03/2003 17:34:38
 
 
To
20/03/2003 16:50:30
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00768139
Message ID:
00768369
Views:
24
>>>I have a background menu form ("frmMenuMain"). When I DO the "frmCustomer"
>>>and from within "frmCustomer", I'd like to set a property which belongs to "frmMenuMain"
>>>
>>>How can reference/set a property of another form from within another modal form which is active?
>>
>>
do frmCustomer with ThisForm
>>
>>in the 'frmCustomer' form init you then have a pointer to the calling form
>>LPara ;
>>   CallingForm
>>
>>CallingForm.CallingFormPropperty = NewValue
>>
>>
>>hope this helps
>
>Another alternative I've seen offered: Because VFP doesn't update _screen.activeform until the very end of the .init, you get the reference to the previous form for free.
>
>Chris.

hello chris, how are you?
that's true, the problem is however, if you need to access the previous form later in the 'child' form, you could get a real headache trying get a pointer to the 'parent' form. that's why i always pass the pointer as an parameter. plus if you hide the 'parent' form before you instanciate the new form, there is now active form on the screen. so personaly i realy like the parameter version better.
Previous
Reply
Map
View

Click here to load this message in the networking platform