#region 截取屏幕图像
private static Bitmap GetScreenCapture()
{
Rectangle tScreenRect = new Rectangle(, , Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Bitmap tSrcBmp = new Bitmap(tScreenRect.Width, tScreenRect.Height); // 用于屏幕原始图片保存
Graphics gp = Graphics.FromImage(tSrcBmp);
gp.CopyFromScreen(, , , , tScreenRect.Size);
gp.DrawImage(tSrcBmp, , , tScreenRect, GraphicsUnit.Pixel);
return tSrcBmp;
}
#endregion

转载自:https://blog.csdn.net/ShuoCham/article/details/81506882

05-11 17:42