#Metro Set Ui Key Events dont work

13 messages · Page 1 of 1 (latest)

jovial token
#

am trying to create a simple program using windows forms C# and have a text box and a list... i can add text to the list using another button but when i try to add text using the keypress event it just dings and nothing happens

opal echo
#

i think you need to work with KeyUp event instead.

jovial token
#

keydown, keypress and keyup

opal echo
#

what key(s) are you processing>?

jovial token
#

enter

opal echo
#

duh

#

To handle keyboard events only at the form level and not enable other controls to receive keyboard events, set the KeyPressEventArgs.Handled property in your form's KeyPress event-handling method to true. Certain keys, such as the TAB, RETURN, ESC, and arrow keys are handled by controls automatically. To have these keys raise the KeyUp event, you must override the IsInputKey
RETURN in Windows is usually <Enter> key

jovial token
opal echo
#

click the link in that document

jovial token
opal echo