Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning values
Message
 
To
26/08/1996 02:45:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00006630
Message ID:
00006651
Views:
62
>>>>
>>>>And if I remember correctly this is ONLY for Modal forms! (s)
>>>>
>>>>Tom
>>>
>>>I'm sorry, but I didn't understood what is only for modal forms.
>>
>>Values can only be returned from Modal forms.
>this is not accurate
>it is true that using RETURN lcMyval in the QueryUnload() event
>will only work in Modal forms
>but as I said in another thread here are 2 more ways :
>
>One option is to instantiate the form inside a container object
>(a formset or an application object) and have the form set a property in
>that container before it releases (e.g in the Destroy() event or in somecases in the QueryUnload() event)
>
>another option is to create some sort of a DoForm function
>and add a guRetVal property to ur forms which will hold
>the return value
>e.g.
>
>FUNCTION DoForm
>  LParameter tcFormName
>   Local loFormInstance,luRetVal
>   loFormInstance=CREATEOBJECT(tcFormName)
>   loFormInstance.show()
>   luRetVal=loFormInstance.guRetVal
>RETURN luRetVal
>
>note: that u will have to hide the form instead of releasing it
>and the form will be released when the DoForm function return
>as the loFormInstance variable will be releases (automatically)

Arnon

Ok McGyver can make an atomic bomb out of a toaster! (s) What ever happened to simple explanations? (s) Yes Arnon can do anything but is the work worth the benifets? I mean a Global var is simple & easy & quick but I was going by the MS recommendations & documentation. Shheeessshhh!.... (g)

Simple old Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform