Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing prperties of other forms.
Message
De
20/03/2003 17:34:38
 
 
À
20/03/2003 16:50:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00768139
Message ID:
00768369
Vues:
22
>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform