Always handle the PreviewKeyDown event in a base form
Posted
by Byron Ross
on Stack Overflow
See other posts from Stack Overflow
or by Byron Ross
Published on 2008-11-05T23:54:19Z
Indexed on
2010/05/03
21:38 UTC
Read the original article
Hit count: 596
We need to handle this event in the base form, regardless of which controls currently have focus. We have a couple of global key commands that need to work regardless of control focus.
This works by handling the PreviewKeyDown event in the form normally. When we add a user control to the form, the event no longer fires.
Am I missing something trivial here? Or do we need to handle the event in the user control first?
Thanks for your help!
Thanks Factor. When I get more time :) I'll get it working 'properley'!
© Stack Overflow or respective owner