Advertisement
smashapps

how to make a Simple web browser

May 14th, 2011
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3.     Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
  4.         WebBrowser1.GoBack()
  5.     End Sub
  6.  
  7.     Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
  8.         WebBrowser1.GoForward()
  9.     End Sub
  10.  
  11.     Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
  12.         WebBrowser1.Stop()
  13.     End Sub
  14.  
  15.     Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
  16.         WebBrowser1.Refresh()
  17.     End Sub
  18.  
  19.     Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
  20.         WebBrowser1.GoHome()
  21.     End Sub
  22.  
  23.     Private Sub ComboBox1_KeyUp(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyUp
  24.         If e.KeyCode = Keys.Enter = True Then
  25.             WebBrowser1.Navigate(ComboBox1.Text)
  26.             WebBrowser1.ScriptErrorsSuppressed = True
  27.         End If
  28.     End Sub
  29.  
  30.     Private Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click
  31.         WebBrowser1.Navigate(ComboBox1.Text)
  32.         WebBrowser1.ScriptErrorsSuppressed = True
  33.     End Sub
  34.  
  35. End Class
  36.  
  37. 'Note
  38. 'You need to add 6 buttons, 1 combobox, and a webbrowser control from the COM components.
  39. '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement