|
-
Jul 4th, 2008, 04:16 PM
#1
Thread Starter
New Member
WebBrowser Retrieve link [VB2008]
Is it possible to retrieve the link that user clicked on the WebBrowser Control
-
Jul 4th, 2008, 09:22 PM
#2
Addicted Member
Re: WebBrowser Retrieve link [VB2008]
Use the "Navigating event"
ex:
Code:
Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
somestring = e.Url
End Sub
-
Jul 6th, 2008, 07:07 PM
#3
Thread Starter
New Member
Re: WebBrowser Retrieve link [VB2008]
vb Code:
Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
somestring = e.Url
End Sub
when the browser gets _blank returned, it seems to have no effect
-
Jul 6th, 2008, 07:14 PM
#4
Hyperactive Member
Re: WebBrowser Retrieve link [VB2008]
It not supposed to. What is it supposed to tell you when theres nothing to go to? It only shows when ur navigating and the page your navigation to and from, take what i used here for an example:
vb Code:
Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating Label2.Text = "Transferring data from " & WebBrowser1.Url.ToString & " ( Port:" & WebBrowser1.Url.Port & " )" End Sub
If i go to google it shows transferring data from google.com and if i go to a next page it shows transferring data from google then transferring data from the site im going to.
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
|