Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning a value from a form
Message
De
06/12/2000 12:15:13
 
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00449724
Message ID:
00450006
Vues:
32
>>Can you return a value from a form? What does the syntax look like from the calling form, if you can?
>>
>>TIA
>
>No you can't do that directly. There are a couples of workaround to that.
>
>1. You assign return value to a public variable of the parent form.
>2. You call a function in the child form and this child shows the form modally. Then the function can return a value.
>3. You put the value in a public variable in the child form, just hide the child form, retreive the public variable from the parent form and the unload the child.

I ended up making the calling form a public variable. I needed to store the return value in a text box of the calling form. The called form is basically a selec printer modal dialog. When I'm done if that hit Ok and they've selected a printer from the list I store it directly to the calling form's text box.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform