Public Class Form1 Dim int As Integer = 0 Private Sub Loading(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserProgressChangedEventArgs) ToolStripProgressBar1.Maximum = e.MaximumProgress ToolStripProgressBar1.Value = e.CurrentProgress End Sub Private Sub Done(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserDocumentCompletedEventArgs) TabControl1.SelectedTab.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).DocumentTitle Texta.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Url.ToString End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Browser As New WebBrowser TabControl1.TabPages.Add("New Page") Browser.Name = "Web Browser" Browser.Dock = DockStyle.Fill TabControl1.SelectedTab.Controls.Add(Browser) AddHandler Browser.ProgressChanged, AddressOf Loading AddHandler Browser.DocumentCompleted, AddressOf Done int = int + 1 CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome() End Sub Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem5.Click Dim Browser As New WebBrowser TabControl1.TabPages.Add("New Page") Browser.Name = "Web Browser" Browser.Dock = DockStyle.Fill TabControl1.SelectedTab.Controls.Add(Browser) AddHandler Browser.ProgressChanged, AddressOf Loading AddHandler Browser.DocumentCompleted, AddressOf Done int = int + 1 CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome() End Sub Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem12.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPropertiesDialog() End Sub Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoBack() End Sub Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoForward() End Sub Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Refresh() End Sub Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Stop() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick End Sub Private Sub Texta_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Texta.KeyDown If e.KeyCode = Keys.Enter Then Try Dim url As String = Texta.Text If Not Texta.Text.StartsWith("http://") Then url = "http://" + url CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(Texta.Text) Texta.Items.Add(url) Catch ex As Exception End Try End If End Sub End Class