Ejemplo n.º 1
0
 private void OnMouseMsg(Object sender, Win32MouseLLEventArgs e)
 {
     // The hook procedure should process a message in less than a registry specified time
     // otherwise the OS will silently removed the hook. The registry value is 5 seconds.
     if (e.Message == Win32Api.WM_LBUTTONUP)
     {
         Win32Api.PostMessage(this.Handle, WM_DELAYED_SELECTED, e.ScreenPoint.X, e.ScreenPoint.Y);
     }
     else if (e.Message == Win32Api.WM_MOUSEMOVE)
     {
         Win32Api.PostMessage(this.Handle, WM_DELAYED_SELECTING, e.ScreenPoint.X, e.ScreenPoint.Y);
     }
 }
Ejemplo n.º 2
0
        private void OnMouseMsg(Object sender, Win32MouseLLEventArgs e)
        {
            // The hook procedure should process a message in less than a registry specified time
            // otherwise the OS will silently removed the hook. The registry value is 5 seconds.
            if (e.Message == Win32Api.WM_LBUTTONUP)
            {

                Win32Api.PostMessage(this.Handle, WM_DELAYED_SELECTED, e.ScreenPoint.X, e.ScreenPoint.Y);
            }
            else if (e.Message == Win32Api.WM_MOUSEMOVE)
            {
                Win32Api.PostMessage(this.Handle, WM_DELAYED_SELECTING, e.ScreenPoint.X, e.ScreenPoint.Y);
            }
        }