Example #1
0
 private void MouseDown(object sender, WindowsHookLib.MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         pressingLMouseBtn = true;
         if (pressingPrintAreaBtns())
         {
             // start screen selection
             mouseStartPos = e.Location;
             printSelection = new PrintAreaSelection(mouseStartPos);
         }
     }
 }
Example #2
0
 private void MouseMove(object sender, WindowsHookLib.MouseEventArgs e)
 {
     if (pressingPrintAreaBtns())
     {
         Point currentMousePos = e.Location;
         printSelection.Select(new Rectangle(mouseStartPos, currentMousePos));
     }
 }
Example #3
0
 private void MouseUp(object sender, WindowsHookLib.MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         if (pressingPrintAreaBtns())
         {
             // stop screen selection
             printSelection.Deselect();
             mouseStopPos = e.Location;
             PrintScreen(mouseStartPos, mouseStopPos);
         }
         pressingLMouseBtn = false;
     }
 }