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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top