首页 > 代码库 > c# 获取屏幕图片

c# 获取屏幕图片

Rectangle bounds = Screen.GetBounds(Screen.GetBounds(Point.Empty));                             using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))                            {                                using (Graphics g = Graphics.FromImage(bitmap))                                {                                    g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);                                }                                bitmap.Save(@"c:\Capture.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);                             }

 

c# 获取屏幕图片