Hi, I hope thos helps you for creating a screenshot in a windows forms application.
int i = 0;
foreach (Screen a in Screen.AllScreens)
{
Bitmap b = new Bitmap(a.WorkingArea.Width, a.WorkingArea.Height);
Graphics g = Graphics.FromImage(b);
g.CopyFromScreen(a.WorkingArea.Left, a.WorkingArea.Top, 0, 0, b.Size);
g.Dispose();
string location = "C:\\Temp\\" + i.ToString() + ".bmp";
try
{
b.Save(location);
}
catch (System.Exception)
{
}
finally
{
b.Dispose();
}
i++;
}