Windows Develop Bookmark and Share   
 index > Windows Forms General > Keys.OemMultiply does not exist, workarounds?
 

Keys.OemMultiply does not exist, workarounds?

I want to react when people press the asterisk key (*).
It is easy for the one on the numeric keypad which is called "Keys.Multiply"

But on an english keyboard you can also get a "*" by pressing shift+8 - there seems to be no entry in the Keys enumeration for that one...
I can't just use Keys.Shift | Keys.D8 because that won't work on foreign keyboards - on a danish keyboard you press Keys.Shift | Keys.Oem2.

What do I do?
Jennifer Connely  Monday, March 30, 2009 9:02 AM
Use the KeyPress event instead of the KeyDown event. Now you can look for '*' and you don't care what key generated it.
Hans Passant.
nobugz  Monday, March 30, 2009 9:34 AM
Use the KeyPress event instead of the KeyDown event. Now you can look for '*' and you don't care what key generated it.
Hans Passant.
nobugz  Monday, March 30, 2009 9:34 AM
That is a good idea - thanks
Jennifer Connely  Monday, March 30, 2009 10:17 AM

You can use google to search for other answers

Custom Search

More Threads

• Login form
• Cross-thread operation not valid exception... using events!
• Printer output
• .Net Active X controls embedded in internet explorer - security considerations
• Capture Icons
• Open hlp File from VB6 application
• Iterating an enumeration with a timer control
• align a lablel programtically
• mysterious menus
• Requesting Help