可以记录鼠标点击次数的
要可以后台运行的*不是隐藏 只是最小划运行****
需要使用到全局钩子
有可以做的联系我 QQ149669350
说过 有偿了
我在珠穆琅玛峰亲手采的雪莲一朵 长白山灵芝两个
下面网址 是我去珠峰的照片
http://bbs.quxizang.com/topic/6921/
没什么价值 就是点心意
无需有偿
下面的是抓鼠标中键消息的,改成左键消息就OK了。累加的部分自己做。
Public Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
Public Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long
Public Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal ncode As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const WH_MOUSE_LL = 14
'鼠标消息
Public Const WM_MBUTTONDOWN = &H207
Public lHook As Long
'----------------------------------------
'鼠标钩子
Public Function CallMouseHookProc(ByVal code As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If wParam = WM_MBUTTONDOWN Then
Debug.Print "M Detected"
ShowMe
End If
If code <> 0 Then
CallMouseHookProc = CallNextHookEx(0, code, wParam, lParam)
End If
End Function
'安装钩子
Public Sub AddHook()
If HookInstalled Then Exit Sub
HookInstalled = True
lHook = SetWindowsHookEx(WH_MOUSE_LL, AddressOf CallMouseHookProc, App.hInstance, 0)
End Sub
'卸钩子
Public Sub DelHook()
If Not HookInstalled Then Exit Sub
HookInstalled = False
UnhookWindowsHookEx lHook
End Sub