How to prevent user closing a mdi form using the close control button 
Author Message
 How to prevent user closing a mdi form using the close control button

How to prevent user closing a MDI form using the close control button

I want that the user use my 'File/Quit' menu.

tia



Sun, 15 Apr 2001 03:00:00 GMT  
 How to prevent user closing a mdi form using the close control button
Check out the QueryUnload event of forms.


Sun, 15 Apr 2001 03:00:00 GMT  
 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



Sun, 15 Apr 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Prevent user from closing form using caption close button

2. problems using close [x] button when closing forms.

3. Tip : VB.NET Form Won't Close on Me.Close + User Controls

4. Form Close Button Does Not Close the Form

5. Preventing User from closing forms

6. Preventing the user from closing a form

7. Form does not close from the UpperRight X Close button

8. Disable Close Button on MDI Child Form? VB5

9. VB MDI Form close button

10. Disabling Min, Max, and Close buttons on MDI form

11. Do not close form on clicking close button in Visual Basic

12. SOLUTION: Stopping user from closing MDI form

 

 
Powered by phpBB® Forum Software