In module:
Code:
Option Explicit
Type POINTAPI 'Declare types
x As Long
y As Long
End Type
Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long 'Declare API
in form:
Code:
Option Explicit
Dim z As POINTAPI 'Declare variable
Dim X
Dim Y
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
GetCursorPos z 'Get Co-ordinets
X = z.x 'Get x co-ordinets
Y = z.y 'Get y co-ordinets
Form2.Text1.Text = X ' sends X to a text box on the second form
Form2.Text2.Text = Y ' sends Y to a text box on the second form
End Sub
That should give you the correct coordinates and put them in textboxes on the second form. Good luck,
bob