I need a pause cycle until the web browser page loads.
string[] lines = (string[]) Invoke((ReadLine)delegate { return logins.Lines; }); foreach (string line in lines) {
How to wait for a wb page to load before continuing?
I tried using the polling flags, setting the variable as true in the WebBrowserDocumentCompletedEventHandler callback function. and then:
wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler( delegate(object sender2, WebBrowserDocumentCompletedEventArgs args) { done = true; });
// ..
wb.Navigate(url.Next(); while (!done) { } done = false;
I am looking for something like:
wb.WaitForDone();
Any help is appreciated. Thanks in advance.
source share