Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
  2. Graphics gp = Graphics.FromImage(bmp);
  3. gp.CopyFromScreen(0, 0, 0, 0, new Size(bmp.Width, bmp.Height));
  4. BinaryFormatter bFormat = new BinaryFormatter();
  5. bFormat.Serialize(ns, bmp);
  6. gp.Dispose();
  7. bmp.Dispose();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement