Kali ini aku mau share bagaimana cara membuat browser sendiri.
Berikut adalah tutorialnya. ~nyan-nyan
[+]4 Command Button
- Name : CmdBack
Caption : Back
- Name : CmdForward
Caption : Forward
- Name : CmdGo
Caption : Go
- Name : CmdRefresh
Caption : Refresh
[+]1 Label
- Name : Label1
Caption : Done
[+]1 TextBox
- Name : Text1
Text : "http://" (Tanpa tanda petik)
dan Klik Project > Components > Centang Microsoft Comon Dialog SP 6 dan Microsoft Internet Controls > Klik "OK"
Buat lagi :
[+]1 ProgressBar
[+]1 WebBrowser
Cara :
Double Klik pada Form1
kosongkan kode, dan isi dengan kode berikut :
Private Sub CmdBack_Click()
On Error Resume Next
WebBrowser1.GoBack
End Sub
Private Sub CmdForward_Click()
On Error Resume Next
WebBrowser1.GoForward
End Sub
Private Sub CmdGo_Click()
On Error Resume Next
WebBrowser1.Navigate (Combo1.Text)
End Sub
Private Sub CmdRefresh_Click()
On Error Resume Next
WebBrowser1.Refresh
End Sub
Private Sub Form_Load()
End Sub
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
On Error Resume Next
If Progress = -1 Then ProgressBar1.Value = 100
Label1.Caption = "Done"
ProgressBar1.Visible = False
If Progress > 0 And ProgressMax > 0 Then
ProgressBar1.Visible = True
Image1.Visible = False
ProgressBar1.Value = Progress * 100 / ProgressMax
Label1.Caption = "Loading " & Int(Progress * 100 / ProgressMax) & "%"
End If
End Sub
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
Combo1.Text = (WebBrowser1.LocationURL)
Form1.Caption = (WebBrowser1.LocationName)
End Sub
^ kode nya
sudah deh selesai ^_^
Rating:
100%
based on 10 ratings.
5 user reviews.
0 komentar:
Post a Comment