我想在Visual Studio 2013中使用Windows窗体创建一个浏览器,并且浏览器需要有一个地址栏,可以像谷歌搜索栏一样在Chrome中加倍。这里是我的地址栏的代码,但我不知道在“If”之后和“Then”之前放置什么以完成此操作。有任何想法吗?创建一个地址栏,该地址栏可以像谷歌浏览器一样用作Google搜索栏。 VB
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
If Then
AxWebBrowser1.Navigate(TextBox1.Text)
Else
AxWebBrowser1.Navigate("http://www.google.com/search?q=" + TextBox1.Text)
End If
End Sub
试试这个:http://msdn.microsoft.com/en-us/library/system.uri.iswellformeduristring.aspx – Blorgbeard