Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reflecting changes in multiple forms
Message
From
03/10/2006 04:02:09
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Reflecting changes in multiple forms
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01158783
Message ID:
01158783
Views:
56
Hello.
I am looking for a way to most effectively do the following:
Form1 and Form2 do not and should not know about each other.
Form1 is launched from a menu.
Form2 is launched form a menu
Form1 has a control which properties (font, color, readonly) depend on a variable/field (not necessarily a ControlSource). The variable/field is edited in the Form2, but since the forms do not know about each other how would Form1 sense that a variable changed and that it should change the properties of its control?
Here is how I would do it.
In the Activate event of Form1 I put This.Refresh(), which in turn triggers the Refresh() methods of all the controls. A control in question in its Refresh() looks around and changes its properties appropriately. The downside is that even after a messagebox the Form1 refreshes itself.
Refreshing a form at a drop of a hat sounds good only to a vegetable seller.

What way would you suggest?

Thank you.
Kamil
A moment of silence is our cosmic reset button.
Next
Reply
Map
View

Click here to load this message in the networking platform