SRL Archive - C#/Visual Basic Help and Tutorials

Moving and Clicking mouse on VB


Footy

2012-10-17 19:59:12

How do I move the mouse, hold down the left and right mouse buttons, and release them in VB.Net? I'm attempting to make a mouse recorder type tool, I just don't know how to do the above..

Thanks!
~Footy

E: Also, how do check if the mouse buttons are being held down would be handy too! ;)

NKN

2012-10-17 21:13:48

http://msdn.microsoft.com/en-us/library/ms171548.aspx

Brandon

2012-10-17 21:46:34

Ahh I really hate VB.. Though I know Kasi know's it fairly well. You might want to ask him for some help on it.

ughh for the mouse thing, it's called a Pinvoke. You need to invoke the function directly from User32.dll/lib. Reason being is because VB doesn't have it's own API for that and it uses the ones from the Native C Library.

VB, C#, F#, all do this.

Example: http://www.dreamincode.net/forums/topic/67915-helpauto-clicker-vb2008/

CynicRus

2012-10-17 23:39:52

http://nubz.net/showthread.php?tid=470