How do I make emulate the mouse clicking without actually using the mouse? I am looking for something similiar to the SetCursorPos function only I want to click the mouse. Both right and left click.
Printable View
How do I make emulate the mouse clicking without actually using the mouse? I am looking for something similiar to the SetCursorPos function only I want to click the mouse. Both right and left click.
You can programmatically call click events, within the form, if thats what you want?
No, I need to click the mouse somewhere else on the screen. It looks like Mouse_Event is what I want to use but I can't seem to get it to work.
Got it.
If you want to click on a particular window, get the get the handler to it, then use SendMessage API to send the Public Const WM_LBUTTONDOWN and WM_RBUTTONDOWN messages.
To find the Specific window use FindWindow, FindWindowEX or GetWindow API Function.
If you want to just click regardless of any window, use mouse_event API, see MSDN documenation of that function.