Last post Apr 25, 2012 07:27 AM by rakeshreddym
Apr 22, 2012 06:53 PM|Phantasmogasm|LINK
i have a web browser control, that refreshes pages on a loop after calling a few subs, i need to create a delay in the loop so that the page has a chance to refresh and redisplay before it loops again. i tried the code below, but it seemed to freeze the
entire form, elements including, so the web browser didnt refresh before the loop, so how could i create a non form-freezing delay for a loop?
For count = 1 To 20
Apr 22, 2012 07:18 PM|ignatandrei|LINK
on other thread / task.
Apr 22, 2012 07:43 PM|Phantasmogasm|LINK
sorry if this sounds like a silly question, but how does this help? surely if the object is frozen then being activated in a different sub will have little difference.
Apr 23, 2012 01:03 AM|ignatandrei|LINK
Thread.Sleep works in the current thread. If you put
Navigate in another thread, it does not sleep.
Apr 25, 2012 07:27 AM|rakeshreddym|LINK
Thread thread2 = new Thread(new ThreadStart(WorkThreadFunction));
public void WorkThreadFunction()
For count = 1 To 20 WebBrowser1.Navigate("URL")
catch (Exception ex)
// log errors