I have a button and a web browser control on my WinForms application. When I click on a button it fires up a browser, but until page is loaded my application hangs even though I use a separate thread for browser control.
How can I handle it so my application doesn't hang while page gets loaded?
private void button1_Click(object sender, EventArgs e)
{
Thread mythread = new Thread(new ThreadStart(go));
mythread.IsBackground = true;
mythread.Name = "mythread";
mythread.Start();
}
void go()
{
webBrowser1.Navigate("google.com");
}