okay here is one i made that does it.
Items needed:
2 labels
combo box
2 timers
put this code underneath (Public Class Form1)
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Declare Sub SetCursorPos Lib "User32" (ByVal x As Integer, ByVal y As Integer)
Private Const MOUSEEVENT_LEFTDOWN = &H2
Private Const MOUSEEVENT_LEFTUP = &H4
Private Declare Sub mouse_event Lib "User32" (ByVal dwflags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal extrainfo As Integer)
Then on the first timer set its interval to "1" and click enabled, then add this code
Code:
Dim F2key As Boolean
Dim f3key As Boolean
F2key = GetAsyncKeyState(Keys.F2) ' you can change f2 to anything you want
f3key = GetAsyncKeyState(Keys.F3) ' you can change f3 to anything you want
If F2key = True Then
Timer1.Enabled = True
End If
If f3key = True Then
Timer1.Enabled = False
End If
then in your next timer make sure it is "NOT" Enabled and its interval is "100" then add this code to it:
Code:
Dim MousePositionX As Integer = Cursor.Position.X
Dim MousePositionY As Integer = Cursor.Position.Y
Dim click As Boolean
click = GetAsyncKeyState(Keys.LButton)
If click = True Then
Label1.Text = MousePositionX
Label2.Text = MousePositionY
ComboBox1.Items.Add(Label1.Text + "," + Label2.Text)
Else
End If
then the two labels show the locations and then they are saved as an item in the combo box
just turn on with hotkey and click somewhere
and im sure you can figure out the rest with using that code. it should be easy if not ill dink around with that too