Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a form as a function
Message
De
05/12/1997 13:06:12
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00064057
Message ID:
00064064
Vues:
25
>I have a VFP form that I would like to have return a value. I know that I can put RETURN (value) in the Unload event of the form, but what is the form calling syntax? With old .SPRs I just created a .PRG and called it like so:
>
>IF MyDialog() = 1
>   ...
>ENDIF
>
>
>How do I do this with a VFP form?
>
>TIA

Put RETURN(THIS.ValueToReturn) in the UnLoad Event of the form.
*You can't return the Value property of an object on the form because the Destroy Event for all form objects has already occured.
*Put the value to be returned in a form property. (lika 'Tag')
The form's WindowType property needs to be set to 1-Modal.

Now that we've got the form built, we need to know how to call it. Call the form with:

DO FORM InputForm TO gcInput

InputForm is the name for the for and gcInput is where the value will be placed.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform