D
DraguVaso
Hi,
I have a MDIForm with some MDIChilds. When the user clicks on the "x" in the
upper right corner, I don't want the MDIChild to be closed, but the property
Visible = False.
So far no problem: I do this useing the Form_Closing-event in which I typed:
e.Cancel = True
Me.Visibible = False
But: When I Close the MDIParent, it wont shut down the whole application
because of the fact that those MDIChilds cancel the closing!
I tryed to put work with a boolean which is set to true when MDIParent is
closed, and first evaluated in the MIDChild_Closing-event, but that doesn't
work either, because of the fact that the Closing-event of the MDIChilds are
fired before the Closing Event of the Parent...
Anybody got any idea how to do this? Maybe with the Closed-event? This event
comes after the Closing-event, but I can't find someting in ot to Cancel the
closing of the form.
I guess there must be a 'nicer' way to do this: Maybe by handling the click
on the "x", and when it is clicked not to close etc etc...
Hoping for your help and thanks a lot in advance,
Pieter
I have a MDIForm with some MDIChilds. When the user clicks on the "x" in the
upper right corner, I don't want the MDIChild to be closed, but the property
Visible = False.
So far no problem: I do this useing the Form_Closing-event in which I typed:
e.Cancel = True
Me.Visibible = False
But: When I Close the MDIParent, it wont shut down the whole application
because of the fact that those MDIChilds cancel the closing!
I tryed to put work with a boolean which is set to true when MDIParent is
closed, and first evaluated in the MIDChild_Closing-event, but that doesn't
work either, because of the fact that the Closing-event of the MDIChilds are
fired before the Closing Event of the Parent...
Anybody got any idea how to do this? Maybe with the Closed-event? This event
comes after the Closing-event, but I can't find someting in ot to Cancel the
closing of the form.
I guess there must be a 'nicer' way to do this: Maybe by handling the click
on the "x", and when it is clicked not to close etc etc...
Hoping for your help and thanks a lot in advance,
Pieter