Sending/Simulating Mouse Clicks
-
I'm developing a software which is similar to PCAnywhere and would like to know how to send / simulate a mouse click (with co-ordinates and stuff) that is not form dependant meaning that i can send / simulate the mouse click anywhere i want, be it the taskbar, tray icon, etc. How do i go about doing it? Are there any samples for this sort of thing?
-
I'm developing a software which is similar to PCAnywhere and would like to know how to send / simulate a mouse click (with co-ordinates and stuff) that is not form dependant meaning that i can send / simulate the mouse click anywhere i want, be it the taskbar, tray icon, etc. How do i go about doing it? Are there any samples for this sort of thing?
In Win98 or higher, there is a function called SendInput which you can use to send input as if it is coming from the keyboard, the mouse, or even another device. For any OS below that, you have to simulate it by using windows messages.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi -
In Win98 or higher, there is a function called SendInput which you can use to send input as if it is coming from the keyboard, the mouse, or even another device. For any OS below that, you have to simulate it by using windows messages.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi