Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 14983

VS 2010 Check if F7 key is pressed

$
0
0
Is there are way to check if a key like F7 is pressed? I don't mean something like check to see when F7 is pressed then do something. F7 itself will do nothing when pressed. What I am looking for is when I click on a button on the form that it checks if F7 is pressed.

I found the code "If My.Computer.Keyboard.ShiftKeyDown then" but this doesn't contain all buttons and I can't use the shift button. I also found other examples for textboxes with the e.KeyValue in the keypressed/keydown event but since the subroutine is triggered from a button I don't have the keypressed/keydown event. The key doesn't have to be F7 specifically. It can be something like Numpad + or numbers too. Just not the basic buttons like letters and numbers, alt, ctrl, shift, capslock, tab.

Viewing all articles
Browse latest Browse all 14983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>