-
Aug 31st, 2012, 07:19 AM
#1
Thread Starter
Addicted Member
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?
-
Aug 31st, 2012, 11:57 AM
#2
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")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|