You are on page 1of 3

Cara Membuat Web Browser Dengan Menggunakan Visual Basic 6.

0
VB 6.0 Aries_Bro Hallo Sobat Blogger... karna kesibukan di sekolah... Saya jadi jarang posting. Kali ini saya mau share Cara membuat Web Browser Sederhana dengan VB6. Syarat membuat Web Browser : 1. Sediakan Makanan Ringan 2. Kopi dan Rokok 3. Dengerin Musik... klo bisa Iwan Fals :) 4. Harus punya VB6 , Full maupun Portable. Kalo belum punya Visual Basic 6, bisa Cari di Indowebster. Langkah2 membuat Web Browser ala Yudhistira Mawardi : 1. Buka Visual Basic 6 nya. Trus pilih Standard EXE. 2. Klik Kanan Pada ToolBox, Kemudian pilih Components atau tekan key Ctrl + T . 3. Kemudian Centang Microsoft html object library, Microsoft internet controls, Microsoft Windows common Controls 5.0 atau 6.0 sama saja. 4. Buat 5 Command Buton, 1 Text Box , 1Label, 1 Webbrowser , 1 Proggress Bar. Saran saya tata Seperti Gambar di bawah.

CommandButton Captionnya saya ganti dengan Back, Forward, Refresh, Stop dan Go. Label Captionnya saya ganti Done TextBox Text kalau bisa Kosong aja.

5. Sekarang Masukkan kode kode berikut, caranya doble klik pada tool / tombol yang sudah kita buat. 1. Back On Error Resume Next WebBrowser1.GoBack 2. Forward On Error Resume Next WebBrowser1.GoForward 3.Refresh On Error Resume Next WebBrowser1.Refresh 4.Stop On Error Resume Next WebBrowser1.Stop 5.GO On Error Resume Next WebBrowser1.Navigate Text1.Text 6. Progress Bar. Langsung Copy dan Paste Code ini pada Form Code 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 Exit Sub

End Sub 8.Resize Form. Langsung Copy dan Paste Code ini pada Form Code Private Sub Form_Resize() On Error Resume Next WebBrowser1.Width = Me.ScaleWidth WebBrowser1.Height = Me.ScaleHeight - 1680 End Sub 6. Coba Jalankan Programnya Run > Start atau F5. Bila anda menemui error Silahkah komen, pasti ane jawab :) 7. Kalau sudah tak tampak error. Langsung pilih File > Make Project1.exe. 8. Finish ^^ Kalau Program sudah jadi akan terlihat seperti ini :

You might also like