Thanks for the reply. But as I was trying to say with my second post, the browser functions are single-threaded so the while-loop will go into an infinite loop since Navigate2 won't get a chance to run. As far as I know, the only way to check if the page has finished loading or not is to write a call-back function.
K
kobelakers76
@kobelakers76
Posts
-
Can I set timeout in IWebBrowser2 Navigate? -
Can I set timeout in IWebBrowser2 Navigate?I am answering my own post but I don't think starting a thread and checking to see whether the page has done loading periodically will work because the Navigate call is single-threaded.
-
Can I set timeout in IWebBrowser2 Navigate?Due to poor network connection, sometimes the page does not fully load when I call Navigate. My code performs certain task after the entire page has done loading. Does anyone know if there is a default timeout for Navigate? If not, is there an elegant way to wait for a while before I call Navigate again? I could create a thread to monitor if my OnDocumentComplete function has been called but I am hoping for another way.