CodeItBetter Programming Another VB Programming Blog

How to cancel the user action when the user trying to close the application using task manager.

Posted on October 5, 2011
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
Filed under: Forms Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.