开发者

Send mouse/key events to program

开发者 https://www.devze.com 2023-01-28 01:54 出处:网络
Hey, I\'m developing application and want to simulate mouse/keyboard events in other program (game). Now I\'m using SendMessage() api to simulate those events. The problem is i cant do anything on com

Hey, I'm developing application and want to simulate mouse/keyboard events in other program (game). Now I'm using SendMessage() api to simulate those events. The problem is i cant do anything on computer meanwh开发者_如何转开发ile. So I was thinking if its possible to send those events to program thats running in background so it doesnt have to be active window. Is that even possible or should i just run this in virtual machine?


I think you want Post Message.

Paul DiLascia has written a great article http://msdn.microsoft.com/en-us/magazine/cc301431.aspx There could be other reasons. But Posting is probably better, and not flooding the message Q.

0

精彩评论

暂无评论...
验证码 换一张
取 消