Bitmap memoryImage;
private void CaptureScreen()
{
Graphics myGraphics = this.CreateGraphics();
Size s =
this.Size;
memoryImage = new Bitmap(s.Width, s.Height,
myGraphics);
Graphics memoryGraphics =
Graphics.FromImage(memoryImage);
memoryGraphics.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, s);
}
private void printDocument1_PrintPage(object sender,
PrintPageEventArgs e)
{
e.Graphics.DrawImage(memoryImage, 0, 0);
}
Capture Current Soft Screen,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/DongJie1982/p/3754984.html