Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reflecting changes in multiple forms
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Reflecting changes in multiple forms
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01158783
Message ID:
01158783
Vues:
57
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform