标题: 以下代码可以在窗口标题里显示鼠标的当前坐标...怎么样利用它来实现: [打印本页] 作者: chenlugen 时间: 2008-8-29 20:46 标题: 以下代码可以在窗口标题里显示鼠标的当前坐标...怎么样利用它来实现: =====================================================================================================
Option Compare Database
Option Explicit
Private Declare Function GetCursorPos Lib "user32" (lpPoint As pointapi) As Long 'Private可以换成Public,以方便其它窗口调用
Private Type pointapi 'Private可以换成Public,以方便其它窗口调用
x As Long
y As Long
End Type
Private Sub Form_Timer()
Dim Point As pointapi
GetCursorPos Point
Me.Caption = Point.x & "/" & Point.y
End Sub
__________________________________________________
以上代码可以在窗口标题里显示鼠标的当前坐标...我想请教达人们...怎么样利用它来实现: