This blog is moved to
http://amalhashim.wordpress.com

Friday, March 13, 2009

Get URL from webbrowser control

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
TextBox1.Text = WebBrowser1.Document.Title
TextBox2.Text = WebBrowser1.Url.ToString
End Sub

Private Sub WebBrowser1_Navigated(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated
TextBox1.Text = WebBrowser1.Url.AbsoluteUri
End Sub

1 comment:

Prakash said...

Thank you, this code very usefull for my project