As has been discussed in another of your threads, keyboard events are only relevant when a control has focus. If a control can't receive focus then you would need to handle the event of the form and then do whatever is appropriate form there.
Then you can obviously find out for yourself with a test that will take about 1 minute to set up. Call Focus and press a key on the keyboard. Either the control will raise a KeyPress event or it won't and that will be your answer.
It works fine on the first keypress, but then it lost focus cause the keypress was an arrow key. Is there a way to in cancel the keypress for previewkeydown?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.