I'm working on a teamviewer-like application (need to move the cursor of an another pc and see the typing of my keyboard there). Is it possible to capture events from my (client) side ( MouseMove, MouseButtonDown, etc) and inject them directly to the other (server) side?
I want to know if exists WPF functions like these win32:
SendMessage();
PostMessage();
SendInput();
If not, how to send WPF Events using these??
Thanks in advance
You may hook your self up on these bubbling routed events, the true param there grabs all events even if they are handled, and even if they are inside child controls. So add them at the top of your visual hierarchy somewhere :)
WPF handlers
And yes you may use SendMessage, PostMessage and SendInput functions in WPF through interop.
Interop
Then you just inject your messages using interop. And yes it is also possible to hook your self onto a winproc in WPF. See this post for details.
pinvoke.net is a good source for w32 C# interop, but something tells me you are already aware of this :) You have an example of sending inputs here.
Hope it helps.