combobox - C# keypress writes in field instead -


i'm writing windows form application need set boolean true whenever key pressed.

simple enough, since have textfield , comboboxes whenever try press key writes whatever key press in textfield/comboboxes. not matter if click somewhere else in application.

i tried making project without textfields , comboboxes , works perfectly.

how can have both input fields , keypress events in same form?

set form.keypreview property keystroke events channeled form's event handlers. once execution hits event handlers, can set whatever variables need, including setting boolean each keystroke.


Comments