-
Hi,
I am running a .avi file in my VB application. During this time I need to block all input(mouse & KB) which I've managed. The only thing I haven't quite figured out is how to block the "ALT+F4" combination. Can anyone help me out here?
Thanks in advance,
Ramya.
-
You could do this in two ways. Set the ControlBox property of the form to False, or you can use the QueryUnload event.
Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbFormControlMenu Then
'if the user pressed ALT+F4 or clicked on the
'close button (X) on the form then cancel the
'unload.
Cancel = True
End If
End Sub
Good luck!