webBrowser.Navigate synchronously

前端 未结 2 1159
长发绾君心
长发绾君心 2021-01-19 23:46

i want to call webBrowser.Navigate(string urlString) synchronously where webBrowser is windows forms control. I do this in such way

...
private delegate void         


        
2条回答
  •  余生分开走
    2021-01-19 23:59

    Not the best way, but you can use this...

    while (this.webBrowser.ReadyState != WebBrowserReadyState.Complete)
    {
         Application.DoEvents();
         Thread.Sleep(100);
    }
    

提交回复
热议问题