Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get the object value from parent form ?
Message
De
20/05/2014 15:31:17
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01600260
Message ID:
01600340
Vues:
51
J'aime (1)
Although passing THISFORM to the child form as a parameter seems to be a more direct answer, Sergey's answer avoids creating a dependency on the implementation of the parent form. Passing THISFORM would mean that you'd code the child form with knowledge of how the parent form is implemented, with names of controls and properties -- meaning that any change in the parent form, or attempt to call the same child form from a different form is likely to break the code of the child form.

>Create object loParam based on Empty class, add whatever properties you need and pass it to the child form.
>
>>I have a main form to call another sub form,
>>there are some text boxes on the main form, such as txtCusno txtClientName, txtClentAddr etc..
>>
>>
>>DO FORM frmOrder WITH thisform.txtCusno.Value
>>
>>
>>the sub form also have the same text boxes, txtCusno, txtClientName, txtClientAddr etc which is same as the parent form
>>I want the text box can also display the same value as the parent form.
>>How to do it ?
>>
>>Please advise.
>>Thanks.
>>Derek
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform