Home » Forms » How to cancel the user action when the user trying to close the application using task manager.
How to cancel the user action when the user trying to close the application using task manager.
Posted on January 4, 2009
1 2 3 4 5 6 7 8 | 'Forms - How to cancel the user action when the user trying to close the application using task manager. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) ' Don't let the user close this form. Select Case UnloadMode Case vbFormControlMenu, vbAppTaskManager Cancel = True End Select End Sub |
Related posts:
- How to find the user is trying to close the application using task manager or by pressing the X in Title bar, etc. How to restrict/refuse that
- How to find out how the form is unloading
- How to confirm the user before exiting your application
- How to Set an application’s Task Manager icon
- How to Undo the last User Action in Text Box
- How to Check whether the user pressed the Cancel Button on Input Box
- How to hide your exe file from Task Manager Applications Tab
- How to Load an application’s form and Task Manager icons from a resource file
- Validate Event Example
- How to use code that allows the user to abort, retry, or ignore when an error occurs
Enjoy this article?
Filed under: Forms
Leave a comment
Sponsors
Link Back to us
Donations
If you are benefited from this site, please donate a small contribution to us. It will help to maintain this site better.