Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I release a top level form from its menu/toolbar
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00376705
Message ID:
00376709
Views:
20
>In my VFP 6 SP 3 application are some SDI forms with their own menues and toolbars. How can I release such a form with a call from one of the toolbar buttons or menu pads? I thought that should be an easy one and put in the toolbar button click event:
THISFORM.oFormRef.closeForm()
oFormRef is a reference to the form which contains the toolbar. The method closeForm() of the form contains:
...<br>RELEASE THISFORM
That gives me a Cx5 error crashing VFP. I guess that is because the call of RELEASE removes the form and hence the toolbar and afterwards there is no point of return in the code segment of the toolbar.

If I understand you, maybe you just need to kill off the toolbar reference in the form close method:

thisform.otoolbar.hide
thisform.otoolbar = .NULL.
thisform.release
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform