You should be able to get it by using the CopyFromScreen
method of the Graphics
class
Rectangle bounds = Program.MainWindow.Bounds;
Bitmap b = new Bitmap(bounds.Width, bounds.Height, PixelFormat.Format32bppArgb);
using (Graphics g = Graphics.FromImage(b))
{
g.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy);
}
b.Save("YOUR FILE NAME HERE");