To create the form you need to create the following; 1 textbox Called "Address" 8 Buttons called:- "Go","CmdBack","CmdForward","CmdStop","Cmdrefresh","CmdHome","CmdMail","CmdEnd". 1 WebBrowser Called "WebBrowser"
This code has been viewed 100528 times.
Instructions: Copy the declarations and code below and paste directly into your VB project.
the code is:Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
End Sub
Private Sub cboAddress_Click()
webNavigate.Navigate cboAddress.Text
End Sub
Private Sub cmdFavorites_Click()
CboAddress.AddItem CboAddress.Text
End Sub
Private Sub cmdGo_Click()
WebBrowser1.Navigate CboAddress
End Sub
Private Sub CmdEnd_Click()
WebBrowser.Visible = False
Main.Visible = True
End Sub
Private Sub cmdHome_Click()
WebBrowser1.Navigate "http://www.google.com"
cboAdresse = WebBrowser1.LocationURL
End Sub
Private Sub cmdMail_Click()
WebBrowser1.Navigate "http://www.hotmail.com"
End Sub
Private Sub cmdBack_Click()
On Error GoTo Error
WebBrowser1.GoBack
Error:
Exit Sub
End Sub
Private Sub cmdRefresh_Click()
WebBrowser1.Refresh
End Sub
Private Sub cmdStop_Click()
WebBrowser1.Stop
End Sub
Private Sub cmdForward_Click()
On Error GoTo Error
WebBrowser1.GoForward
Error:
Exit Sub
End Sub
Private Sub cboAddress_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdGo_Click
End If
End Sub
Private Sub WebBrowser1_TitleChange(ByVal Text As String)
CboAddress = WebBrowser1.LocationURL
End Sub
Private Sub Address_Change()
WebBrowser1.Navigate Text1
End Sub
Private Sub Go_Click()
WebBrowser1.Navigate Address
End Sub
__________________________
Kerastase NutritiveKerastase Resistance