Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple parameters returned from form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00030589
Message ID:
00030747
Vues:
29
>I know I'm not the first to ask, but I wasn't clear about the answer before: what is the best way to return multiple parameters from a form? I have been concatenating my parameters into a string with a separater "|" character, which seems dumb. I believe I tried returning them all in an array but couldn't get that to work.

Hi Bret,

Just call the form with the parameter thisform and then save that
parameter to a property in the called form named CallingForm. This
will allow you to change the properties on the callingform directly
(remember inter-object messaging is part of the Object Oriented
paradigm).

The code goes something like this:

***From within the called form's unload...

m.CallingForm=thisform.CallingForm && save the object ref to a var.

m.CallingForm.TextBox1.value='Whatever I want it to be!'

m.CallingForm.TextBox2.value='Something else'

** You can set as many properties as you'd like!
***

By making your "called" form modal and returning a lSuccessful value,
you'll stop program execution until the values are gotten. This is
usually what you want.

Good luck!

Hugh
Microsoft hears loudest what the VFP community says about Visual FoxPro by looking at the bottom line!

Support the product. Buy the latest version!

Hugh Winters @ WorldData 408-512-1131
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform