Advertisement
Guest User

Untitled

a guest
Jun 5th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             var printscreen = new Bitmap(
  2.                 Screen.PrimaryScreen.Bounds.Width,
  3.                 Screen.PrimaryScreen.Bounds.Height
  4.             );
  5.  
  6.             var graphics = Graphics.FromImage(printscreen as Image);
  7.             graphics.CopyFromScreen(0, 0, 0, 0, printscreen.Size, CopyPixelOperation.SourceCopy);
  8.  
  9.             printscreen.Save("screenshot.png", ImageFormat.Png);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement