Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to send a variable to form?
Message
De
08/09/1999 03:53:40
 
 
À
07/09/1999 18:35:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00262206
Message ID:
00262288
Vues:
31
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform