Rectangle R = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea;
System.Drawing.Image img = new Bitmap(R.Width, R.Height);
Graphics G = Graphics.FromImage(img);
G.CopyFromScreen(new Point(0, 0), new Point(0, 0), new Size(R.Width, R.Height));
IntPtr dc = G.GetHdc();
G.ReleaseHdc(dc);
G.Dispose();
img.Save("d:\\a.jpg");
这代码可以截工作窗口,
改成
Rectangle R = System.Windows.Forms.Screen.PrimaryScreen.Bounds;