Answer the question
In order to leave comments, you need to log in
C# save screenshot to server?
can i save the file locally
Graphics graph = null;
var bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
graph = Graphics.FromImage(bmp);
graph.CopyFromScreen(0, 0, 0, 0, bmp.Size);
Int32 unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
string time = unixTimestamp.ToString();
bmp.Save(time + ".png", ImageFormat.Png);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question