nuther WebBrowser Q

  • Thread starter Thread starter mcnews
  • Start date Start date
M

mcnews

i need a good way to stay in a loop until the page/Document i want is
the one i need.
what i have below works, but using a timer loop isn't always going to
work.
sometimes the readystate works (waits long enough), but usually not.
i need something less hit or miss.

Me.WebBrowser1.Document.InvokeScript("validateLogin")
'loop till validation page completes
Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
Loop

Do
'Keep the app from freezing.
Application.DoEvents()
Loop Until Now > timeOut

WebBrowser1.Navigate("https://services.lala.com/ddd/ltem/showMe.do")
 
i need a good way to stay in a loop until the page/Document i want is
the one i need.
what i have below works, but using a timer loop isn't always going to
work.
sometimes the readystate works (waits long enough), but usually not.
i need something less hit or miss.

Me.WebBrowser1.Document.InvokeScript("validateLogin")
'loop till validation page completes
Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
Loop


Doesn't the web browser object throw events? I think there is a
statechanged event?
 
Back
Top