I'm having a little trouble creating a global keyboard handler with the
functionality I need. I want the form to handle all the keystrokes, which
works perfectly when the form's KeyPreview property is set to true. However,
there are instances when if a certain control has focus, I want the keyboard
handling to be controlled by that control.
Is there any elegant way to do this?
I thought about setting the form's KeyPreview event to false in the
control's Enter event handler and true in it's Leave event handler, but that
didn't seem elegant to me.
Any help would be appreciated. Thanks.
Sergio