Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form that returns a value to a variable
Message
 
To
21/08/2000 15:46:50
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00407476
Message ID:
00407579
Views:
26
Mike,
Can't it also be done by passing the calling form 'object' as a parameter in CreateObject()? Obviously you'll have to be able to handle this object in the INIT() of the form class, but you can pass information back to the calling form. With a little thought I think you could make some pretty generic code here.

>You can do it like this:
>
>
oForm = createobject('myform')
>oForm.Show(1)
>wait window oForm.cReturnValue
>oForm = .NULL.
>
>define class myform as form
>	cReturnValue = ""
>	add object text1 as textbox with;
>		controlsource = "thisform.cReturnValue"
>	proc QueryUnload
>		nodefault
>		this.hide()
>	endpro
>enddefine
>
>Another way to do it, is to have the form manipulate a private variable you declare in the calling program, and finally, create an object in the calling program, and pass a reference to the form, have the form save the reference and change a property on it.
>
>When the form closes, the calling program will be able to see the change in the object property.
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform