码迷,mamicode.com
首页 > 其他好文 > 详细

Capture Current Soft Screen

时间:2014-05-28 13:31:12      阅读:275      评论:0      收藏:0      [点我收藏+]

标签:c   tar   a   int   width   new   

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

Capture Current Soft Screen

标签:c   tar   a   int   width   new   

原文地址:http://www.cnblogs.com/DongJie1982/p/3754984.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!