Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make mouse click

Status
Not open for further replies.

PhilippeSignoret

Programmer
May 19, 2001
21
0
0
MX
As part of a program I'm making, I need to move the mouse to a certain position and make it click without touching the real mouse.

So far I can make the mouse move, but I don't know how to make it click!

Does anyone know how to do this???

Thanks in advance!

-PhilipeSignoret
 
If you want to click command1 put this in after you get the mouse to where you need it... Call Command1_Click
You could "click" on any control that has a click event this way.
Hope this helps :)
Dragnut
 
No... I need th mouse to click on any place on the screen, even somewhere that is not on the form.

Something like giving it the coordinates, and the program clicks in that place.

--PhilippeSignoret
 
There is libraries for the dos version of visual basic 1 dos that will move the mouse to a specific location, but I do not believe they will work in vb3 or vb4. PS: It was zephyr software's SVGA libraries.
 
Once you have given the commands to move the mouse pointer to the area you want it to go to, the Call Command1_Click will click the mouse at that location, as dragnut indicated.
 
Does anyone know any good reference sites for winapi programming with visual basic? Seems like whenever i need to do something and get stumped WinApi manipulation does the trick

Thanks for any help
-CROW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top