nzfire
asked on
Prevent ALT+F4 vb.net
Hi All,
I need to disable the use of Alt+F4 to close my app in vb.net.
Thanks
I need to disable the use of Alt+F4 to close my app in vb.net.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormC
If e.CloseReason = CloseReason.UserClosing Then
e.Cancel = True
End If
End Sub
This will, however, also disable the ability to close the window via the X button, which may or may not be of use.