>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.