-
How do I prevent the user from using the keyboard for an interval of time during my VB application? not only do I want to prevent CTRL+ALT+DEL and the Windows keys from being pressed(which can be done using the SystemParametersInfo API) but I want to prevent any key from being used. Can anyone help me out here?
Thanks.
-
Since you want to disable the keyboard for a specific time
interval during your application execution, you can set a
flag at the beginning of the code (blnKbdDisable = True)
and then in the KeyDown and KeyPress events add code
similar to this ...
'For KeyPress Event ...
if blnKbdDisable = True then
KeyAscii = 0
end if
'For KeyDown Event ...
if blnKbdDisable = True then
KeyCode = 0
end if
Then at the end of your particular time interval you can set
the flag back to false.
Hope this helps.