Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Classes
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01003444
Message ID:
01003642
Views:
14
This message has been marked as the solution to the initial question of the thread.
In the click event of the close button on "frmMyFormClass" place
thisform.visible = .f.
At this point the code will continue in the calling form and you can dispose of oForm
Local oForms as form
oForm=newobject('frmMyFormClass','myClassLibrary.vcx')
oForm.Show(1)
* oForm is modal at this point
* User clicked Close button which caused "frmMyFormClass" to loose focus
* Control resumes here when oform looses focus by being made invisible
oForm = .null.  && Force oform destroy
release loform  && release oForm
>Why won't this form release?
>
>Have a form class in a vcx with a close button with 'release thisform' or 'thisform.release()' in the click method.
>
>In another form have a button with this in the click method:
>
>local oForm
>oForm=newobject('frmMyFormClass','myClassLibrary.vcx')
>oForm.show(1)
>
>
>Clicking on the close button on the myFormClass form does not release the form! I have to click on the 'X' in the titlebar to close the form. Why is that? If this is unstandard code, how would I lauch a form that exists only as a class?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform