Example #1
0
 private MouseEventArgs DecodeMouseMove(IntPtr lParam)
 {
     MOUSEHOOKSTRUCT mousehookstruct = (MOUSEHOOKSTRUCT) Marshal.PtrToStructure(lParam, typeof(MOUSEHOOKSTRUCT));
     MouseEventArgs args = new MouseEventArgs();
     args.x = mousehookstruct.pt.X;
     args.y = mousehookstruct.pt.Y;
     args.hitTestCode = mousehookstruct.wHitTestCode;
     return args;
 }
Example #2
0
 private MouseEventArgs DecodeLowLevelMouse(IntPtr lParam)
 {
     MSLLHOOKSTRUCT msllhookstruct = (MSLLHOOKSTRUCT) Marshal.PtrToStructure(lParam, typeof(MSLLHOOKSTRUCT));
     int time = msllhookstruct.time;
     int timeStamp = this.timeStamp;
     this.timeStamp = msllhookstruct.time;
     MouseEventArgs args = new MouseEventArgs();
     args.x = msllhookstruct.pt.X;
     args.y = msllhookstruct.pt.Y;
     return args;
 }
Example #3
0
 private void Mh_MouseDown(object sender, TouchHook.MouseEventArgs e)
 {
     richTextBox1.AppendText($"clicked {e.x},{e.y}\n");
 }
 private void Mh_MouseDown(object sender, TouchHook.MouseEventArgs e)
 {
     textBox.AppendText($"clicked\n");
 }