Multithreading.. (doing more than one thing at once) with webbrowsers
I have 20 or so websites in a listbox and 4 webbrowsers on a form.
For each website, i have to use the code
===================================
x = x + 1
webbrowser1.navigate list1.list(x)
do
doevents
loop until webbrowser1.busy = false
posttosite
do
doevents
loop until webbrowser1.busy = false
===================================
and then it loops to the next item in the listbox.
My question is, how can i get 4 webbrowsers to function independantly of each other? that is, each webbrowser uses the code above, replacing webbrowser1 with the name of the control for that particular webbrowser. That way, once a webbrowser is done going throught that code (because the time it takes for each site to load is different), it automatically navigates to the next item in the listbox, and goes through the code, and goes to the next site.
Of course, the 'next site' is determined by the variable x, and x goes up by one as each webbrowser starts its thing.
So, anyone know how to do this?
Help! Doing an action if a navigate fails in a webbrowser..