Try using the GetCursorPos API function.


VB Code:
  1. Private Declare Function GetCursorPos Lib "user32" _
  2. (lpPoint As POINTAPI) As Long
  3.  
  4. Private Type POINTAPI
  5.     x As Long
  6.     y As Long
  7. End Type
  8.  
  9. Private Sub Command1_Click()
  10.     Dim PT As POINTAPI
  11.     GetCursorPos PT
  12.     MsgBox "(" & PT.x & "," & PT.y & ")"
  13. End Sub