Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I need to send to a process mouse events like
mouseEvent(leftDown,x,y);

My purpose is to post events to the app main loop (without even changing the cursor position) so I can keep using mouse and keyboard for doing other things.

Does exist a way to do that on Windows?

PS: sorry for my English.
Posted
Updated 2-Jun-10 2:17am
v2
Comments
Moak 2-Jun-10 8:16am    
Updated tags, perhaps narrow down which programming language you want to use.

First, you need a handle to the target application's main window. This is much easier to achieve if your application launches the target application interally (using the Process object). After you get the window handle, you can send the window any Windows message that you wish.


BTW, if your app doesn't launch the target app, you can still get the window handle by enumerating the running processes.

Google is your friend.
 
Share this answer
 
first use findwindow get the HWND

then sendmessage(...)

then ok

my English is not well,sorry,I want to say I can not express
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900