Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a form
Message
From
23/08/2004 19:31:16
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00935781
Message ID:
00935784
Views:
26
This message has been marked as the solution to the initial question of the thread.
>Hi all, I have this form class which I instantiate this way:
>
>
>  SET CLASSLIB TO calendario ADDITIVE
>
>  Thisform.Calendario=CREATEOBJECT("Calendario")
>  Thisform.Calendario.Left= This.Left+This.Width+Thisform.Left+10
>  Thisform.Calendario.Top = This.Left+This.Width+Thisform.Top
>  Thisform.Calendario.Show
>
>
>Now, how can I return a value from this form. It's a modal form.
>
>Thanks in advance
>
>Enmanuel

You can do something like this:

In your class, add aproperty for the return val, say .Retval.

Instead of closing your form class, hide your form, and let the calling program retrieve the property and close the form.

In your class,
thisform.Hide()
And in your calling program,
thisform.Calendario.Show()
dRetDate = thisform.Calendario.RetVal
thisform.Calendario.Release()
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform