views:

151

answers:

1

I have an application running which I have outside of the screen limits. I want to send a click to this window without bringing it to the front and without affecting the cursor.

I have tried mouse_event and SendInput but these doesn't seem to work in that way. Have I missed anything when trying these APIs or/and is there another way of doing this?

I'm using Vista and Windows 7 together with C#.

A: 

You could implement a public method in the form which is outside your window which will receive the event instance and then process it according to your needs.

That whould solve your problem.

Kico Lobo
The application outside of the screen is an arbitrary application that i put there using SetWindowRect. Your solution only solves the problem if the application is written by me( am I right? ), which isn't the case.
Marcus Johansson