Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form that returns a value to a variable
Message
 
À
21/08/2000 15:46:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00407476
Message ID:
00407579
Vues:
27
Mike,
Can't it also be done by passing the calling form 'object' as a parameter in CreateObject()? Obviously you'll have to be able to handle this object in the INIT() of the form class, but you can pass information back to the calling form. With a little thought I think you could make some pretty generic code here.

>You can do it like this:
>
>
oForm = createobject('myform')
>oForm.Show(1)
>wait window oForm.cReturnValue
>oForm = .NULL.
>
>define class myform as form
>	cReturnValue = ""
>	add object text1 as textbox with;
>		controlsource = "thisform.cReturnValue"
>	proc QueryUnload
>		nodefault
>		this.hide()
>	endpro
>enddefine
>
>Another way to do it, is to have the form manipulate a private variable you declare in the calling program, and finally, create an object in the calling program, and pass a reference to the form, have the form save the reference and change a property on it.
>
>When the form closes, the calling program will be able to see the change in the object property.
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform