1. 程式人生 > >c# 獲取屏幕圖片

c# 獲取屏幕圖片

screen aging height image sys pty map log wid

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# 獲取屏幕圖片