Controlling the focus in WindowsForms
.NET (Core and Framework)
1
Posts
1
Posters
0
Views
1
Watching
-
Hi. Does anyone know how can I make a control work without recieving the focus? The thing is that I'm trying to simulate a kyboard (on a UserControl) which is added to a form. Whenevet a key is clicked, I use the SendKeys.SendWait method to simulate a keystroke. In order to process the simulated keystroke, the recieving form should be in focus. To achieve this, I use the SetFocus function (from User32.dll) with the handler of the recieving form. So far so good - it all works fine except for the slight occasional control bar flicker when changing the focus. So - is there a way to avoid all that focus transfer?