Beispiel #1
0
 private int MouseHook(int nCode, int wParam, IntPtr lParam)
 {
     if (wParam == WM_LBUTTONDOWN)
     {
         mouseclick = true;
     }
     else if (wParam == WM_LBUTTONUP)
     {
         mouseclick = false;
     }
     return(WinHook.CallNextHookEx(hook, nCode, wParam, lParam));
 }
Beispiel #2
0
 /// <summary>
 /// 停止录制
 /// </summary>
 public void Stop()
 {
     WinHook.UnhookWindowsHookEx(hook);
     lastBitmap.Dispose();
     stop = true;
 }