Windows Develop Bookmark and Share   
 index > Windows Forms General > KeyUp problem on drawing
 

KeyUp problem on drawing

I created user control that can accept user key input....

problem is that when user press "q" e.keycode points to capital q(Q),

or on keyboard 7(D7) is always "7" never "/" with or without SHIFT

zmrcic  Tuesday, October 30, 2007 10:02 AM

The right thing is to separate actions in keyUp and KeyPress event...that way I'll get chars and shift actions handled separatly
zmrcic  Wednesday, October 31, 2007 7:34 AM
If you want the symbols behind the numbers (for example 7 -> "/"), you have to check if Shift button is pressed. If e.Modifiers (string) contains the word Shift, you should add / instead of 7.

Hope this helps, if doesn't I can give you more detailed answer. For now, this is enough.
Timo Salomäki
a© Ţĩмό Şąļσмāĸ? ²θΦ7  Tuesday, October 30, 2007 4:44 PM

The right thing is to separate actions in keyUp and KeyPress event...that way I'll get chars and shift actions handled separatly
zmrcic  Wednesday, October 31, 2007 7:34 AM

You can use google to search for other answers

Custom Search

More Threads

• RichTextBox
• ListBox SelectionMode
• Question about customizing display of a ListBox
• new to windows forms
• Using context menu strips for dynamic controls
• Setting the ScrollBar position
• Setting duration of keypress in SendKeys?
• Placing Windows Form in bottom of all windows
• OpenFileDialog currently active window problem?
• .net apps deployment with MySQL Setup