Image myImage = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics g = Graphics.FromImage(myImage);
g.CopyFromScreen(new Point(0, 0), new Point(0, 0), new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height));
IntPtr dc1 = g.GetHdc();
g.ReleaseHdc(dc1);
myImage.Save("c:\\test.jpeg");
沒有留言:
張貼留言