
How to prevent user closing a mdi form using the close control button
Hello,
Quote:
> How to prevent user closing a MDI form using the close control button
> I want that the user use my 'File/Quit' menu.
> tia
You can use the event MDIFORM_Unload(Cancel as boolean) for this
purpose. Have a boolean flag CloseOkay that is set to True only when the
user uses the 'File/Quit' menu. In the Unload event of the MDI form if
CloseOkay is true then Cancel is False, otherwise Cancel is True (So
Cancel = Not CloseOkay).
Good Luck
Sleiman