Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send a variable to form?
Message
From
08/09/1999 03:53:40
 
 
To
07/09/1999 18:35:33
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00262206
Message ID:
00262288
Views:
32
Hi Angela.

>> I try to use the command "line". After I create the form using Create Form command. Then I try to issue "myform.line(1,2,3,4). It still said "Can't find an object" <<

In the form designer, add a new property to your form to hold the paramters passed to it. To do this, click on Form and then new property. Suppose you call this new property cSomeProperty.

You need this property to hold the passed parameter if you want it to be visible to the entire form. Parameters are passed to the form's init and in VFP, variables are scoped to the current method.

In the init of your form, put the line

LPARAMETERS tcSomeVariable
Thisform.cSomeProperty = tcSomeVariable

You refer to the saved parameter in code as Thisform.cSomeProperty.

To do the form from the command window you type

=
DO FORM Myform WITH

HTH

Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform