I have tried to navigate through a couple of web pages using an backgroundworker & webbrowser. Im using this function which it doesnt work. Im not sure what is going wrong here.
I see only the MessageBox.Show(arr[0]); nothing else. the webbrowser doesnt change too
private void bw_DoWork(object sender, DoWorkEventArgs e)
{
string[] arr = { "http://stackoverflow.com/", "http://www.codeproject.com/", "http://www.codeplex.com/" };
for (int i = 0; i < 3; i++)
{
MessageBox.Show(arr[i]);
bB_checker.Invoke((EventHandler)delegate { bB_checker.Navigate(arr[i]); });
while (bB_checker.ReadyState != WebBrowserReadyState.Complete)
{
// System.Threading.Thread.Sleep(100);
Application.DoEvents();
}
}
}