General information
Category:
Coding, syntax & commands
>Hi everybody!
>
>Can someone tell me, the correct way to return a value from a modal form, if the form was launched by the Createobject() command?
>
>Now, I give in a parameter the name of the variable, in which I want to get back the return value. I am cuoriuos, if there is a better way.
>
>TIA
>
>BB
You can use DO FORM form TO RetVar. In the .Unload of your form. RETURN RetVar
It may not necessarily be a better way, but this is how I go about these things.
I create a custom object in whose .Init I include .AddObject("oForm", "FormDef")
The custom object can have any number of methods created to manipulate the form and you can set any number of properties to act as return values. It always has this one method .ShowForm which contains; THIS.oForm.Show()
Within the form, various actions can set the properties of the custom object.
THISFORM.Parent.SomeProperty = ?? The point here is that you can set any number of properties within the custom object for use elsewhere.
Steve Despres
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only