请问在Form和PictureBox中, 
如何获取鼠标单击事件中的具体单击点的坐标? 
也就是想获得单击的具体位置 
谢谢

解决方案 »

  1.   

    Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    MsgBox X
    MsgBox Y
    End Sub
      

  2.   

    用MouseDown 或MouseUp事件,参数X,Y就是鼠标的坐标.
    Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)End Sub
      

  3.   

    上面的是在窗口中的坐标
    这个是屏幕坐标:
    Option Explicit
    Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Type POINTAPIx As Longy As LongEnd TypePrivate Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    Dim aa As POINTAPI
    GetCursorPos aa
    Debug.Print aa.x
    Debug.Print aa.y
    End Sub