KeyDown event

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

A

Hi,
When I have a blank form and I create a KeyDown event
the keyDown event works fine (fires). However, as soon as
I drop a button on a form it looks like the button has the
focus and the keDown doesn't work.
How do u set the focus to the form?

thanks,
A
 
Hello,

A said:
When I have a blank form and I create a KeyDown event
the keyDown event works fine (fires). However, as soon as
I drop a button on a form it looks like the button has the
focus and the keDown doesn't work.
How do u set the focus to the form?

Set the form's KeyPreview property to True.

HTH,
Herfried K. Wagner
 

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