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.
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.