title: how to detect documentready event of WebBrowser Control?
body: <p>I am somewhat stuck and trying to get the event firing when document is ready. do you know what I am doing wrong?</p>
  
  <pre><code>Public Class Form1
  'Declaration
  Public Event DocumentCompleted As WebBrowserDocumentCompletedEventHandler
  
  Private Sub Main(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
      'Dim frm As New Form1
      'frm.Show()
      WebBrowser1.Navigate("http://test.com")
      AddHandler WebBrowser1.DocumentCompleted, New  _
           WebBrowserDocumentCompletedEventHandler(AddressOf WebBrowser1_DocumentComplete)
      Me.Text = WebBrowser1.ReadyState
  
  End Sub
  
  Private Sub WebBrowser1_DocumentComplete(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles Me.DocumentCompleted
      Me.Text = WebBrowser1.ReadyState
  End Sub
  
  End Class
  </code></pre>