Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Createobject() and returning a parameter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00047277
Message ID:
00047364
Vues:
30
>Can someone tell me, the correct way to return a value from a modal form, if the form was launched by the Createobject() command?
>
>Now, I give in a parameter the name of the variable, in which I want to get back the return value. I am cuoriuos, if there is a better way.

oForm = CREATEOBJECT("MyForm")
oForm.Show()

In your modal form store the value you wish to return in a property of the form. In the OK/Cancel or Close button on the modal form, use thisform.Hide() to close the form. Once the form is hidden, the next line after the show is executed and you can retrieve the value from the form as the form still exists.

nRetVal = oForm.nRetVal
oForm.Release()


Hope this helps.
Darrel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform