Public Class browser
Public Declare Function GetASyncKeyState Lib "user32" Alias "GetASyncKeyState" (ByVal vKey As Long) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
End Sub
Private Sub browser_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
End Sub
Private Sub browser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Interval = 7000
WebBrowser1.Navigate(My.Settings.homepage)
End Sub
Private Sub ProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgressBar1.Click
End Sub
Private Sub WebBrowser1_Navigated(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated
Timer1.Start()
End Sub
Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged
ProgressBar1.Maximum = e.MaximumProgress
ProgressBar1.Value = e.CurrentProgress
End Sub
Private Sub TabPage1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabPage1.Click
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ToolStripTextBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripTextBox1.Click
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ChangeHomePageToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangeHomePageToolStripMenuItem.Click
enterhomepage.Show()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ToolStripTextBox1.Items.Add(WebBrowser1.Url.ToString)
Timer1.Stop()
End Sub
Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Forward.Click
WebBrowser1.GoForward()
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back.Click
WebBrowser1.GoBack()
End Sub
Private Sub ToolStripButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
WebBrowser1.Stop()
End Sub
Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Home.Click
WebBrowser1.Navigate(My.Settings.homepage)
End Sub
Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click
WebBrowser1.Navigate(ToolStripTextBox1.Text)
End Sub
Private Sub ToolStripButton7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Refresh.Click, Refresh.Click
WebBrowser1.Refresh()
End Sub
Private Sub ViewPageSourceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ViewPageSourceToolStripMenuItem.Click
Dim HTMLBody, HTMLTrunc As String
Dim HTMLDoc As mshtml.HTMLDocument
HTMLDoc = WebBrowser1.Document.DomDocument
HTMLBody = HTMLDoc.body.outerHTML
HTMLBody = HTMLDoc.body.innerHTML
HTMLTrunc = Mid(HTMLBody, 1, 5000000)
viewurlsourcecode.TextBox1.Text = (HTMLTrunc)
viewurlsourcecode.Show()
End Sub
Private Sub MenuStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles MenuStrip1.ItemClicked
End Sub
Private Sub Button1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
End Sub
Private Sub ToolStripTextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ToolStripTextBox1.KeyDown
If e.KeyCode = System.Windows.Forms.Keys.Enter Then
WebBrowser1.Navigate(ToolStripTextBox1.Text)
End If
End Sub
End Class