c# - Saving multiple screenshots -
my goal capture screen shots of entire desktop.
i have set timer 5 second interval testing purposes.
i using code screenshots:
int screenleft = systeminformation.virtualscreen.left; int screentop = systeminformation.virtualscreen.top; int screenwidth = systeminformation.virtualscreen.width; int screenheight = systeminformation.virtualscreen.height; using (bitmap bmp = new bitmap(screenwidth, screenheight)) { using (graphics g = graphics.fromimage(bmp)) { g.copyfromscreen(screenleft, screentop, 0, 0, bmp.size); } bmp.save(screenpath); }
as screen path
string screenpath = @"c://eventscout/screen " + datetime.now.tostring("yyyymmddhhmmss") + ".png";
everything working fine aside fact end 1 screenshot.
what doing wrong? ideas, or leads?
you need change file name saving on each iteration.
Comments
Post a Comment