Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the object value from parent form ?
Message
From
20/05/2014 15:31:17
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01600260
Message ID:
01600340
Views:
50
Likes (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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform