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
Joakim Astrom
NA
21
0
Lock a WebBrowser object until DocumentComplete
Feb 3 2010 5:14 AM
Hello everyone.
I have a problem when I use the WebBrowser object for navigating to multiple urls, one after the other. I have a list of urls. And for each url I want to navigate to this url, when DocumentCompleted event occurs, parse the information, and then go on to the next url in my list.
However, I need to lock the WebBrowser object in my foreach loop until a DocumentComplete event takes place, and then move on so it does not interrupt the download before it's completed. How can I do this?
Sort of like this:
foreach (string url in myUrlList)
{
if
(!
this
.Browser.IsBusy)
{
this
.Browser.Navigate(artNo);
this
.Browser.DocumentCompleted +=
new
WebBrowserDocumentCompletedEventHandler
(DocumentCompleted);
}
}
..but this example doesn't work. Just to give an idea of my problem.
Thanks in advance for any suggestions!
Reply
Answers (
2
)
Editable dropdownlist
Accessing Form elements from separate class