Quote Originally Posted by dunfiddlin View Post
Why do you need to wait for it to load? Or perhaps just, do you need to wait for it to load?
because the html elements my loop is trying to manipulate are not there until after the website loads.


this loop works fine on my computer when debugging but the doevents() randomly causes that protected memory error on all other computers
Do While Form1.WebBrowser1.ReadyState <> WebBrowserReadyState.Complete
System.Windows.Forms.Application.DoEvents()
Loop


so how can I wait for the form1.webbrowser1 to load from within a loop (which involves navigating multiple websites) or from outside of form1 without using application.doevents()