如何用C#直接从显存中获取屏幕图像
1个回答
展开全部
Screen scr = Screen.PrimaryScreen;
Rectangle rc = scr.Bounds;
int iWidth = rc.Width;
int iHeight = rc.Height;
Bitmap myImage = new Bitmap(iWidth, iHeight);
Graphics g1 = Graphics.FromImage(myImage);
g1.CopyFromScreen(new Point(0, 0), new Point(0, 0), new Size(iWidth, iHeight));
Rectangle rc = scr.Bounds;
int iWidth = rc.Width;
int iHeight = rc.Height;
Bitmap myImage = new Bitmap(iWidth, iHeight);
Graphics g1 = Graphics.FromImage(myImage);
g1.CopyFromScreen(new Point(0, 0), new Point(0, 0), new Size(iWidth, iHeight));
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询