Take the 2-minute tour ×

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 meanwhile. 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?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer


