注册 登录
编程论坛 VB6论坛

如何取得指针位置

ybfq65 发布于 2017-01-24 16:35, 920 次点击
老师们邦我看看这个:
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
        x As Long
        y As Long
End Type

Private Sub Form_Load()

End Sub

Private Sub Timer1_Timer()
Dim lpPonit As POINTAPI
GetCursorPos lpPonit
Me.Caption = "X = " & lpPoint.x & " Y = " & lpPoint.y
End Sub
运行后说缺少对象?实时错误424?谢谢!!
1 回复
#2
xzlxzlxzl2017-01-24 16:45
lpPonit<>lpPoint
1