当前位置:编程学习 > C#/ASP.NET >>

用C#实现全屏幕抓图

int width = Screen.PrimaryScreen.Bounds.Width;

            int height = Screen.PrimaryScreen.Bounds.Height;

            Bitmap bmp = new Bitmap(width, height);

            using (Graphics g = Graphics.FromImage(bmp))
            {

                g.CopyFromScreen(0, 0, 0, 0, new Size(width, height));

            }
            bmp.Save(@"c:1.jpg");
            bmp.Dispose();

    
补充:软件开发 , C# ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,