|
-
Nov 14th, 2010, 01:58 AM
#1
Thread Starter
Hyperactive Member
Dimming a webbrowser?
Code:
Dim wb As New WebBrowser
wb.Navigate("http://google.com")
MsgBox(wb.Url.ToString)
Code:
WebBrowser1.Navigate("http://google.com")
MsgBox(WebBrowser1.Url.ToString)
How come the first one does not work? (The message shown is blank)
-
Nov 14th, 2010, 04:16 AM
#2
Re: Dimming a webbrowser?
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
* Rate It  If you Like it
__________________________________________________________________________________________
" Programming is like sex: one mistake and you’re providing support for a lifetime."
Get last SQL insert ID 
-
Nov 14th, 2010, 12:44 PM
#3
Thread Starter
Hyperactive Member
Re: Dimming a webbrowser?
 Originally Posted by motil
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
Is it possible to do without showing the webbrowser?
-
Nov 14th, 2010, 12:52 PM
#4
Re: Dimming a webbrowser?
yep just don't add it to the form (remove Me.Controls.Add(wb))
* Rate It  If you Like it
__________________________________________________________________________________________
" Programming is like sex: one mistake and you’re providing support for a lifetime."
Get last SQL insert ID 
-
Nov 14th, 2010, 02:52 PM
#5
Fanatic Member
Re: Dimming a webbrowser?
If you want to download information from the internet without showing anything visually, you might want to consider using a WebClient object instead.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|