TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
try abc
1.4k
306
487.3k
Problem in taking screenshot of webPages
Jun 4 2008 9:16 AM
Hello,
I want screenshot of website by passing url. I used the DrawtoBitmap method of webbrowser but it is not working properly. It gives empty images. I want screenshot of websites which i passed in loop.
Code ::
arrayList arrURL;
bool flagSC = true;
for(int i=0l i< url.length;i++)
{
if (flagSC == true)
{
webbrowser1.navigate(arrURL[i].ToString());
while (webBrowser1.ReadyState != WebBrowserReadyState.Complete)
{
Application.DoEvents();
}
}
else
{
i -= 1;
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
flagSC = false;
Bitmap bitmap = new Bitmap(webBrowser1.Bounds.Width, webBrowser1.Bounds.Height);
webBrowser1.DrawToBitmap(bitmap, webBrowser1.Bounds);
bitmap = (Bitmap)bitmap.GetThumbnailImage(175, 128, null, IntPtr.Zero);
bitmap.Save(filePath);
flagSC = true;
bitmap.Dispose();
}
}
The above code gives blank images.
Thanks in advance.
Reply
Answers (
0
)
How I can use DateTime other than System datetime for my application.
c# and Active Directory