Exemplo n.º 1
0
 void hook_KeyPressed(object sender, KeyPressedEventArgs e)
 {
     if (e.Modifier == ModifierKeysH.Control)
     {
         SelectAreaScreenShot();
     }
     else if (e.Modifier == ModifierKeysH.Alt)
     {
         Rectangle completeRect = Main.screenshotManager.GetCompleteScreen();
         Rectangle rect = ScreenshotManager.NativeMethods.GetActiveWindowAbsoluteClientRect();
         rect.Offset(-completeRect.X, -completeRect.Y);
         Main.screenshotManager.AreaScreenShot(rect, ScreenshotManager.NativeMethods.GetActiveWindowTitle());
     }
     else
     {
         Rectangle rect = Main.screenshotManager.GetCompleteScreen();
         Main.screenshotManager.AreaScreenShot(rect);
     }
 }