I need to work out wether my windows form has focus of the mouse and keyboard.
My project is the following:
2 or more applications.
1 application is a controller talking to some hardware
The client application are connected using a named pipe or .NET remoting.
When an event occurs on the hardware, the controlling process also sends the events to the clients which are connected.
Now the clients could be numerous, but I only want the client which has the focus of the keyboard and mouse to handle the event. All of the applications are set to topmost, so we can't work out which form has focus. Trawling on the net, I can't seem to find a nuance of information on how to do it without using external call into kernel32 which is not something I really want to do. Is their a native way to do this?
Many Thanks
<links removed by moderator>
My project is the following:
2 or more applications.
1 application is a controller talking to some hardware
The client application are connected using a named pipe or .NET remoting.
When an event occurs on the hardware, the controlling process also sends the events to the clients which are connected.
Now the clients could be numerous, but I only want the client which has the focus of the keyboard and mouse to handle the event. All of the applications are set to topmost, so we can't work out which form has focus. Trawling on the net, I can't seem to find a nuance of information on how to do it without using external call into kernel32 which is not something I really want to do. Is their a native way to do this?
Many Thanks
<links removed by moderator>
Comment