-
October 25th, 2011, 04:52 PM
#1
How to make the webbrowser wait before completing another action?
I have a list box and for each item I want it to visit a different site. Whats happening is it visits the first site (first item in the list) but then just iterates down the list not completing it for the other items.
How can I make it wait for the other to complete?
-
October 25th, 2011, 07:25 PM
#2
Re: How to make the webbrowser wait before completing another action?
-
October 26th, 2011, 10:04 AM
#3
Re: How to make the webbrowser wait before completing another action?
-
October 26th, 2011, 02:23 PM
#4
Re: How to make the webbrowser wait before completing another action?
I think I solved the issue...sort of. I added Application.DoEvents and it makes the listbox wait for it to load the site and fill data to the forms but how do I make the listbox iteration wait for user input before moving on?
-
October 27th, 2011, 01:25 AM
#5
Re: How to make the webbrowser wait before completing another action?
You can add Thread.Sleep( seconds ) and mention the time duration ( generally in milliseconds ) for the active thread/application to wait and they add some code to prompt the user at the end of each and every iteration
-
October 27th, 2011, 05:25 AM
#6
Re: How to make the webbrowser wait before completing another action?
Quick question won't Thread.Sleep freeze the GUI? Will it stop a page from loading in the background?
Also I fixed the issue completely by adding an if/then statement but now my issue is my documentcompleted isn't letting the page load. Is it cause I am loading a page directly in the documentcompleted event?
I added a while loop saying if the page has loaded to perform the code but its not working that great...
Any suggestions?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|