title: Sending Keys to webbrowser vb.net?
body: <p>I have a webbrowser in my vb.net application and I would like to enter text into a textbox on a site. When button 1 is clicked, it programmatically finds the text box and types the message in.</p>
  
  <pre><code>Public Class Form1
  
          Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
              SendKeys.Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}")
              SendKeys.Send("The text I want to send to the control.")
          End Sub
  
  End Class
  </code></pre>
  
  <p>However, it doesn't work. The tab keys do get the curser in the right place but when the text is pasted in the application crashes. Whats gone wrong?</p>