How can I disable the program's TAB or ALT key? Example: Clicking TAB does not make any changes.
Is it possible in KeyDown
?
How can I disable the program's TAB or ALT key? Example: Clicking TAB does not make any changes.
Is it possible in KeyDown
?
No KeyDown
put something like this:
if (e.KeyCode == Keys.Tab || e.Alt) {
e.SuppressKeyPress = true;
}
Obviously you can put the keys you want. Note the difference between a "normal" key and a modifier. The SuppressKeyPress
is the secret to swallowing the key without doing anything.