how can my winform receive keyboard events?

  • Thread starter Thread starter assaf
  • Start date Start date
A

assaf

hi all

i want my winform to receive keyboard events.
however, when i add input controls to my winform
(such as a button),
my winform stops receiving keyboard events.

how can my winform receive keyboard events?


assaf
 
assaf said:
i want my winform to receive keyboard events.
however, when i add input controls to my winform
(such as a button),
my winform stops receiving keyboard events.

Set the form's 'KeyPreview' property to 'True' and add a handler to the
form's 'KeyDown'/... event(s).
 
Back
Top