C# 截取屏幕
标签:turn new drawing screen returns capture from name bit
///
/// 截取屏幕
///
/// 起点X坐标
/// 起点Y坐标
/// 截取宽度
/// 截取高度
///
private void CaptureScreen(double x, double y, double width, double height)
{
int ix = Convert.ToInt32(x);
int iy = Convert.ToInt32(y);
int iw = Convert.ToInt32(width);
int ih = Convert.ToInt32(height);
System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(iw, ih);
System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(bitmap);
graphics.CopyFromScreen(ix, iy, 0, 0, new System.Drawing.Size(iw, ih));
graphics.Dispose();
}
C# 截取屏幕
标签:turn new drawing screen returns capture from name bit
原文地址:https://www.cnblogs.com/flamegreat/p/12195730.html
文章来自:
搜素材网的
编程语言模块,转载请注明文章出处。
文章标题:
C# 截取屏幕
文章链接:http://soscw.com/index.php/essay/43239.html
评论