How to perform mouse/keyboard events for user? Like macro tools do

G

Guest

I want to do something similar to what some macro tools do, where they
perform mouse/keyboard events on the user's machine , while intercepting the
user's current keyboard/mouse events so that it does not interfere (unless
they press a certain hotkey to deactivate it). How would I go about doing
this?
 
N

Nicholas Paldino [.NET/C# MVP]

This would be a two-step process. To send input to an application, you
will have to call the SendInput API function through the P/Invoke layer. To
intercept all input for a window, you will have to create a windows hook
(which will require more calls through the P/Invoke layer).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top