如何用C#直接从显存中获取屏幕图像

如题所述

第1个回答  2010-11-16
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));本回答被提问者和网友采纳
相似回答