-
Window KeyDown
Hello! In the KeyDown event of the MainWindow, i want a message box to appear when the users presses the +/- on the keyboard. So here is my code:
if e.KeyCode = Keys.OEMPlus then MsgBox("Plus")
if e.KeyCode = Keys.OEMMinus then Msgbox("Minus")
This code works great but not for the +/- from numpad too. It only works with +/- on the main keyboard. How can i make both work?
-
Re: Window KeyDown
Code:
If e.KeyCode = Keys.Oemplus OrElse e.KeyCode = Keys.Add Then MsgBox("Plus")
If e.KeyCode = Keys.OemMinus OrElse e.KeyCode = Keys.Subtract Then MsgBox("Minus")