override void OnKeyDown(KeyEventArgs e) problem

  • Thread starter Thread starter dave
  • Start date Start date
D

dave

The execution control does not jump here if I have
button, textbox, etc in the window form. Works OK with an
empty form.
Thanks
 
Dave,

It doesn't work because the focus is then on that control, and not on
the form itself. What you want to do is set the KeyPreview property on the
form to true, and then it should fire.

Hope this helps.
 
Back
Top