0% found this document useful (0 votes)
30 views1 page

Form1 Object Webbrowserdocumentcompletedeventargs

This document contains code for a web browser application with navigation controls. It defines a Form1 class with event handlers for a WebBrowser control that update the form title and URL textbox when pages load. Buttons allow navigating to a URL, going back or forward between pages as possible. A second class defines similar navigation behavior with a textbox for the URL instead of a separate control.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Form1 Object Webbrowserdocumentcompletedeventargs

This document contains code for a web browser application with navigation controls. It defines a Form1 class with event handlers for a WebBrowser control that update the form title and URL textbox when pages load. Buttons allow navigating to a URL, going back or forward between pages as possible. A second class defines similar navigation behavior with a textbox for the URL instead of a separate control.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Public Class Form1 Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted Me.Text = Me.WebBrowser1.DocumentTitle Me.Direc.

Text = Me.WebBrowser1.Url.OriginalString End Sub Private Sub Ir_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Ir.Click Me.WebBrowser1.Navigate(Me.Direc.Text) End Sub Private Sub Atras_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Atras.Click If Me.WebBrowser1.CanGoBack Then Me.WebBrowser1.GoBack() End If End Sub Private Sub Adelante_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Adelante.Click If Me.WebBrowser1.CanGoForward Then Me.WebBrowser1.GoForward() End If End Sub End Class

Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.WebBrowser1.Navigate(Me.TextBox1.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Me.WebBrowser1.CanGoBack Then Me.WebBrowser1.GoBack() End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Me.WebBrowser1.CanGoForward Then Me.WebBrowser1.GoForward() End If End Sub Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted Me.Text = Me.WebBrowser1.DocumentTitle Me.TextBox1.Text = Me.WebBrowser1.Url.OriginalString End Sub End Class

You might also like