I need to get a screenshot of entire page, for example of this directory: http://www.wikilistings.co.uk/submit.php?sel=233
I use this code i have found on the forum:
However the problem is that it saves the screenshot of the zennoposter and not the screenshot of acrtually page. Why is it?
I use this code i have found on the forum:
Код:
var picfilename = @"D:\test.jpg";
string picfilename = project.Variables["picfilename"].Value;
//HtmlElement he = instance.ActiveTab.FindElementByAttribute("body","fulltag","body","text",0);
//int screenWidth = Convert.ToInt32(he.GetAttribute("height"));
//int screenHeight = Convert.ToInt32(he.GetAttribute("width"));
//http://zennolab.com/discussion/threads/screenshot-from-this-site.8956/
int screenWidth = 1000;//Screen.GetBounds(new Point(0, 0)).Width;
int screenHeight = 1000;//Screen.GetBounds(new Point(0, 0)).Height;
Bitmap bmpScreenShot = new Bitmap(screenWidth, screenHeight);
Graphics gfx = Graphics.FromImage((Image)bmpScreenShot);
gfx.CopyFromScreen(0, 0, 0, 0, new Size(screenWidth, screenHeight));
bmpScreenShot.Save(picfilename);
However the problem is that it saves the screenshot of the zennoposter and not the screenshot of acrtually page. Why is it?