Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to access non Modal form Properties
Message
From
24/03/2003 07:57:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
24/03/2003 07:51:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00769173
Message ID:
00769174
Views:
23
>Dear Experts,
>
>I have created inside a project a form(FormN0Modal) with window type 0-Modeless. From this form I call another form (DO FORM) with window state 1-Modal. Then I want to change a property from the first form. (Execute on FormModal button1 click -> FormN0Modal.label1.Caption = 'test')
>
>Is there a way to accomplish this reference?
>
>Thanks in Advance,
>
>Spyros Christodoulou

There are several ways to accomplish it. For instance, you could pass the first form as a parameter to the second:
* In form 1:
do Form2 with ThisForm, (additional parameters)

* Form2.Init():
* Save parameters, so they are available in all methods
lparameters toCallingForm, (additional parameters)
ThisForm.oCallingForm = toCallingForm
ThisForm.AdditionalParameter1 = ...

* Anywhere in Form2:
ThisForm.oCallingForm.AnyProperty = AnyValue
You could also save a reference to the parent form in a global variables.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform