PDA

Click to See Complete Forum and Search --> : Disable ALT F2 Key


Cabal
Jan 25th, 2000, 01:59 AM
here u go

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyF2 Then
If Shift = 4 Then
KeyCode = 0 'ie do nothing
End If
Else
Exit Sub
End If

End Sub


the only other way of doing it would be to use subclassing (see www.vbaccelerator.com) (http://www.vbaccelerator.com))
and intercept the windows message at a lower level but thats quite hard.

scottr
Jan 25th, 2000, 11:00 AM
Hi been able to disable all the F key in my acccess application but having trouble with the Alt F2 key. does anyone know how to disable this. The user could cause some major damage if this is pressed. As always thanks for your help.

Thanks,

Scott

scottr
Jan 26th, 2000, 10:34 PM
Thanks for the speedy reply but unfortunallty the code doesnt work. what seemes to happen is access picks up the key before the code kicks in. Im going to keep seaching for an answer. Its one of those things I know it can be done, just dont know how :)

Again Thanks,

Scott