希望 永远是快乐的.

有一种沉默叫霸气,有一种内敛叫个性,有一种简单叫深遂,有一种不屑叫自我。

导航

Capture Current Soft Screen

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);
}

posted on 2014-05-27 14:01  希望(Jack)  阅读(300)  评论(0编辑  收藏  举报