Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning a value from a form in a class
Message
 
 
À
14/06/2000 08:56:26
Randy Riegel
Zimish Contracting
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00380150
Message ID:
00380225
Vues:
18
Usually hti sis done using DO FORM ... TO but you can accomplish the same thing by creating a private variable (must be private not local so it will be availble in the form) and setting that variable in the Unload event of the form.

BTW, make sure the form class is modal or use the loform.Show(1) syntax to make it modal. Otherwise, your program will continue execution and you might get erros because you haven't received a return value.

>VFP 6.0 SP 3
>
>I have a form in a class that I would like to return a value. But I can't figure out how I can do it. I have "return myretvalue" in the unload method of form but I don't know how to grab that value from the calling program. Here what I have so far:
>
>set classlib to myclass
>loForm = createobject("_myform")
>loForm.visible = .t.
>
>This shows the form but does not allow me to get the return value. The value ranges from 0 - 3 depending on user actions.
>
>Thanks,
>Randy
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform