Hello,
I have a question regarding SendKeys.Send; everything I've read leads me to believe this code should output the text I assign SendKeys at the cursor location in google, but when the program activates SendKeys, webbrowser1 looses focus and there is no output. Any ideas what I'm doing wrong? As a polite request, I already know how to do this using html.elements, but I'd like to try it a different way all the same; thank you.
Code:Public Class Form1 Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click WebBrowser1.Navigate("www.google.com") End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WebBrowser1.Focus() SendKeys.Send("yahoo!") End Sub End Class




Reply With Quote