-
I need some major help here. I have posted before but nobody responded. OK, here is my problem:
I have a login form and I have disabled Ctrl+Alt+Del, so the user cannot bring up the end task dialogue. What I need to do is detect when these keys are pressed, so I can show a 'fake' end task dialogue box ;)
I can use GetAsyncKeyState to test when two of the keys are pressed, but I'm having trouble testing when the alt key is pressed!!!!
Can anyone give me some sample code or any help whatsoever? Thanks people.
David Richardson ;)
-
David Richardson
Put this in your login form's KeyDown event
Something like:
' This code was not tested.
If Shift = vbKeyAlt* + vbKeyControl* and KeyCode = vbKeyDelete* then
' User pressed ctrl+alt+Del
End If
'* - Check your object browser for the correct names of the key constants.
-
Thanks, I have looked at the Object browser, but as I said... i cannot detect when the Alt key is pressed as ther is no keycode constant or what have you available. This has got to be possible.... Someone... Aaron Young!!! Plz help!!! ;)
David Richardson
-
ok then, since i don't have vb in this machine, try getting help for the "KeyDown" event and look for the "Shift" parameter. the help will explain all the parameters. i'm sure there is a constant value for the alt and ctrl keys.