Hotkeys

  • Thread starter Thread starter Jeremy Bradshaw
  • Start date Start date
J

Jeremy Bradshaw

I want to assign a specific hotkey to my forms (eg. F12, or Shift-F12) to
invoke some client code. How can I do this ?
 
OK I found out how to do it, via the KeyDown event, but the problem I'm
having is that I have to attach this to any control on my form that can
receive focus before it will fire. Why, if I attach it to only the form
itself, does this not fire wherever focus is?
 
Yep, that worked, thanks very much.

Herfried K. Wagner said:
Hello,



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