title: How to wait until WebBrowser is completely loaded in VB.NET?
body: <p>I am using the WebBrowser control in my VB.NET application to load a few URLs ( ~10-15) and save their HTML source in a text file. However, my code doesn't write the source of the current page rather the initial one because the it is triggered even before the page is loaded. </p>
  
  <p>How can I wait until the page is completely loaded before calling any event?</p>
  
  <p>I tried the following code but it doesn't work.</p>
  
  <pre><code>Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
     Application.DoEvents()
  Loop
  </code></pre>