WINFORM中几句程序获取整个屏幕的图片及当前窗口的图片快照
2020-12-13 03:46
标签:winform width for new size file /// /// 获取整个屏幕的图片 g.CopyFromScreen(new Point(0, 0), new Point(0, 0), Screen.PrimaryScreen.Bounds.Size);
return image; } public static Image GetWinformImage() //获取当前屏幕的图像 return b; } WINFORM中几句程序获取整个屏幕的图片及当前窗口的图片快照,搜素材,soscw.com WINFORM中几句程序获取整个屏幕的图片及当前窗口的图片快照 标签:winform width for new size file 原文地址:http://www.cnblogs.com/liuruitao/p/3818304.html
///
///
public static Image GetScreenImage()
{
Image image = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics g = Graphics.FromImage(image);
{
Bitmap b = new Bitmap(this.Width, this.Height);
this.DrawToBitmap(b, new Rectangle(0, 0, this.Width, this.Height));
//b.Save(yourFileName);
文章标题:WINFORM中几句程序获取整个屏幕的图片及当前窗口的图片快照
文章链接:http://soscw.com/essay/28263.html