//方法一
public static void GetScreen1()
{
//截取屏幕内容
Size screen = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Bitmap memoryImage = new Bitmap(screen.Width, screen.Height);
Graphics memoryGraphics = Graphics.FromImage(memoryImage);
memoryGraphics.CopyFromScreen(0, 0, 0, 0, screen, CopyPixelOperation.MergePaint);
//memoryImage
//memoryImage.Save(@"screen.jpg",ImageFormat.Jpeg);
MemoryStream data = new MemoryStream();
memoryImage.Save(data, ImageFormat.Png);
}
//方法二
public class ScreenCapture
{
/// <summary>
/// Creates an Image object containing a screen shot of the entire desktop
/// </summary>
/// <returns></returns>
public static Image Ca