1
How can I disable key TAB or ALT program? Example: clicking TAB does not make any changes.
It is possible in the KeyDown
?
1
How can I disable key TAB or ALT program? Example: clicking TAB does not make any changes.
It is possible in the KeyDown
?
2
In the KeyDown
put something like this:
if (e.KeyCode == Keys.Tab || e.Alt) e.SuppressKeyPress = true;
I put in the Github for future reference.
Obviously you can put the keys you want. Note the difference between a "normal" key and a modifier. The SuppressKeyPress
is the secret to swallow the key without doing anything.
Correct, but it works normally the TAB and ALT keys. This I find strange.
That’s right, but since you didn’t put your code in, you can’t help any more than that. Try thresh and see if you’re getting in there, running right.
I am using Sendkeys command, to select an image, but it is giving TAB in the program along with File Window, so I wanted to lock the keys. so would work only file window.
Browser other questions tagged .net winforms vb.net
You are not signed in. Login or sign up in order to post.
Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?
– Maniero