Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to return result from form created with CreateObject
Message
From
20/02/2008 17:01:08
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01294492
Message ID:
01294498
Views:
23
Store the value in a form property then read it:

oForm = createobject("Myform")
oForm.Show()

* Form processing happens

TheValue = oForm.ReturnValue
oForm.Release()

>I usually create forms using the form designer, and run them with the DO FORM command. So, I am familiar with passing arguments into the form via that command, and obtaining results from the form:
>
>When I use the DO FORM command, the form returns its result from the Unload method: "RETURN thisform.Result"
>
>However, I have recently created a form class that I want to instantiate and run via CreateObject(). I know that I can pass parameters into the form in the arguments in the call to CreateObject(). But, how do I get a result back from the form?
>
>Thanks,
>Jim
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform