Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to access non Modal form Properties
Message
De
24/03/2003 07:57:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
24/03/2003 07:51:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00769173
Message ID:
00769174
Vues:
22
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform