Try using the GetCursorPos API function.
VB Code:
Private Declare Function GetCursorPos Lib "user32" _ (lpPoint As POINTAPI) As Long Private Type POINTAPI x As Long y As Long End Type Private Sub Command1_Click() Dim PT As POINTAPI GetCursorPos PT MsgBox "(" & PT.x & "," & PT.y & ")" End Sub




Reply With Quote