Code:Dim wb As New WebBrowser
wb.Navigate("http://google.com")
MsgBox(wb.Url.ToString)
How come the first one does not work? (The message shown is blank)Code:WebBrowser1.Navigate("http://google.com")
MsgBox(WebBrowser1.Url.ToString)
Printable View
Code:Dim wb As New WebBrowser
wb.Navigate("http://google.com")
MsgBox(wb.Url.ToString)
How come the first one does not work? (The message shown is blank)Code:WebBrowser1.Navigate("http://google.com")
MsgBox(WebBrowser1.Url.ToString)
try this:
Code:Dim wb As New WebBrowser
Me.Controls.Add(wb)
wb.Navigate("http://google.com")
While (Not wb.ReadyState = WebBrowserReadyState.Complete)
Application.DoEvents()
If (wb.ReadyState = WebBrowserReadyState.Complete) Then
MessageBox.Show(wb.Url.ToString)
End If
End While
yep just don't add it to the form (remove Me.Controls.Add(wb))
If you want to download information from the internet without showing anything visually, you might want to consider using a WebClient object instead.