is there a code to block alt-F4 please help thanks alot
Printable View
is there a code to block alt-F4 please help thanks alot
Here is a start. This will at least capture it.
From here you have to figure out how to keep your form or project from closing.Code:Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = vbAltMask Then
Select Case KeyCode
Case vbKeyF4
MsgBox "thats it"
End Select
End If
End Sub
good luck
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = vbAltMask Then
Select Case KeyCode
Case vbKeyF4
End Select
End If
End Sub
Private Sub Form_Load()
App.TaskVisible = False
Form2.Show
End Sub
Private Sub mnufileclose_Click(Index As Integer)
Unload Form1
Unload Form2
End Sub
Private Sub Timer1_Timer()
r = Int((4200 - 5 + 1) * Rnd + 5)
i = Int((5150 - 10 + 1) * Rnd + 10)
Form1.Move i, r
End Sub
Private Sub Timer2_Timer()
MsgBox "To close the programm Hit Ctrl + B!!", vbCritical, "HEHE!"
End Sub