4个回答
展开全部
用不着钩子,就是捕获鼠标状态、获得鼠标位置、重新定位鼠标的一个过程,加个计时器:
Private Declare Function GetAsyncKeyState Lib "user32 " (ByVal vkey As Long) As Integer
Private Declare Function SetCursorPos& Lib "user32" (ByVal x As Long, ByVal y As Long)
Private Declare Function GetCursorPos& Lib "user32" (xy As PointAPI)
Private Type PointAPI
x As Long: y As Long
End Type
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim MyKey As Long, dl As Long, xy As PointAPI
MyKey = GetAsyncKeyState(vbKeyLButton)
If MyKey = -32768 Or MyKey = -32767 Then
dl = GetCursorPos(xy)
SetCursorPos xy.x, xy.y + 10
End If
End Sub
Private Declare Function GetAsyncKeyState Lib "user32 " (ByVal vkey As Long) As Integer
Private Declare Function SetCursorPos& Lib "user32" (ByVal x As Long, ByVal y As Long)
Private Declare Function GetCursorPos& Lib "user32" (xy As PointAPI)
Private Type PointAPI
x As Long: y As Long
End Type
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim MyKey As Long, dl As Long, xy As PointAPI
MyKey = GetAsyncKeyState(vbKeyLButton)
If MyKey = -32768 Or MyKey = -32767 Then
dl = GetCursorPos(xy)
SetCursorPos xy.x, xy.y + 10
End If
End Sub
展开全部
可能要用勾子拦截系统消息,还是等着看高手是怎么解决的。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
期待。。。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
做过后台点击广告的程序
不知道你说的是不是
要的话可以找我
不知道你说的是不是
要的话可以找我
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询