Well,I looked around to find the easiest and most simple way to get the co-ordinates of your mouse without having to use api's.
I got some feedback on this forum on how you guys would go about it, and took from that what I learnt, and wrote it how I would go about it( I didn't use anyone elses code as for some reason they didn't work for me or when they did they only got the position within the form)
Ok so first download the coordinate finder,after that feel free to follow the tutorial if you wan't to know how to make the mouse move to a certain position and click ect.
Ok so first you have to declare these under Public class Form1(These pretty much just tell the program that you'r going to be using the mouse)
Code:
'Handles the Mouse Cursor Clicking
Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
'Handles the Mouse Cursor Position
Private Declare Sub SetCursorPos Lib "User32" (ByVal X As Integer, ByVal Y As Integer)
Now that you have declared those go ahead and make a button or something similar and double click it.
Under it type:
Code:
Dim MousePositionX As Integer = xxx
Dim MousePositionY As Integer = xxx
This is where the program listed below would come in handy,you need the x and y coordinates to fill in the "xxx's" Which will tell the program where you wan't the mouse to be on your screen.
Now just press enter and type this:
Code:
SetCursorPos(MousePositionX, MousePositionY)
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
Ok so,pretty self explanatory,set cursor pos will set the position you specified above,and mouse_event will hold left click down,then bring it back up,you can use (RIGHTDOWN,RIGHTUP,LEFTDOWN,LEFTUP) and I'm pretty sure you can use the middle button on the mouse too.
So just quickly so you all understand,if you wan'ted it to go left click then right click then you could go
Code:
mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_UP, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
Thankyou

hope you can understand.Have fun
First ones just .exe
seconds .exe + source