翻阅古今
// Use this version to capture the full extended desktop (i.e. multiple screens)Bitmap screenshot = new Bitmap(SystemInformation.VirtualScreen.Width,
SystemInformation.VirtualScreen.Height,
PixelFormat.Format32bppArgb);Graphics screenGraph = Graphics.FromImage(screenshot);screenGraph.CopyFromScreen(SystemInformation.VirtualScreen.X,
SystemInformation.VirtualScreen.Y,
0,
0,
SystemInformation.VirtualScreen.Size,
CopyPixelOperation.SourceCopy);screenshot.Save("Screenshot.png", System.Drawing.Imaging.ImageFormat.Png);