Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal form class
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00043552
Message ID:
00043605
Views:
31
>>>Hi all,
>>> I have a form class that is modal and returns a boolean value. How do I get the return value? For example,
>>>
>>>
>>>mfc = createobject('modalformclass)
>>>test = mfc.show() && this doesn't work I know, but what do i use instead?
>>>
>>>Any help appreciated
>>>
>>>-mike
>>
>>in your modal class, add property retval
>>on close event, store return value to retval
>>
>>loForm = createobject('modalformclass')
>>loForm.show()
>>lnRetVal = loForm.retval
>>release loForm
>
>
>Hi Dave,
> I tried it the way you said, but it seems that after loForm.show() returns, loForm has been released and loForm evaluates to .NULL. and I get an error saying loForm is not an object.
>
>Thanks for the help,
>
>Mike

change the close event to say

thisform.hide

this will return to the code above without releasing the modal form.
Previous
Reply
Map
View

Click here to load this message in the networking platform