Advertisement
benshepherd

ScreenCapture class

Apr 4th, 2013
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1.     public static class ScreenCapture
  2.     {
  3.         public static Bitmap Fullscreen()
  4.         {
  5.             using (Bitmap bm = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height))
  6.             {
  7.                 using (Graphics g = Graphics.FromImage(bm))
  8.                 {
  9.                     g.CopyFromScreen(Point.Empty, Point.Empty, Screen.PrimaryScreen.Bounds.Size);
  10.                 }
  11.  
  12.                 return bm;
  13.             }
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement