|
=====================================================================================================
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
__________________________________________________
以上代码可以在窗口标题里显示鼠标的当前坐标...我想请教达人们...怎么样利用它来实现:
当窗体没有操作,,,即无鼠标无动作时,,,发生预先设定的事件?????比如弹出提示框,,,,"你已经多久没操作了,,,点击鼠标或移动鼠标继续,,,否则退出..."等效果???? |
|