Membuat Web Browser Sederhana Menggunakan Visual Basic 6.0

9

Ok.Langsung aja yah..

1.Buka VB 6.0
2. Pilih Standar Exe

1

 

 

 

 

 

 

 

 

 

 

kemudian akan terbuka halaman seperti berikut:2

3.Tekan Ctrl+T

4.Centang:

  • Microsoft HTML Object Library
  • Microsoft Internet Control
  • Microsoft Windows Commond Control 5.0

3

5.klik ok, akan mucul tampilan seperti ini disebelah kiri layar

4

6.Buat Form Seperti berikut:

  • 5 commandbutton
  • 1 text box
  • 2 label
  • 1 progressbar
  • 1 webbrowser

11

7. Untuk mengubah caption, klik tombol seperti dibawah(untuk progressbar dan webbrowser tidak diubuah)

7

8. Doble Klik Form

form

9. Masukkan kode dibawah:

Private Sub Command1_Click()

On Error Resume Next

WebBrowser1.GoBack

End Sub

Private Sub Command2_Click()

On Error Resume Next

WebBrowser1.GoForward

End Sub

Private Sub Command3_Click()

On Error Resume Next

WebBrowser1.Refresh

End Sub

Private Sub Command4_Click()

On Error Resume Next

WebBrowser1.Stop

End Sub

Private Sub Command5_Click()

On Error Resume Next

WebBrowser1.Navigate Text1.Text

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

Label2.Caption = "Done"

ProgressBar1.Visible = False

If Progress > 0 And ProgressMax > 0 Then

ProgressBar1.Visible = True

Image1.Visible = False

ProgressBar1.Value = Progress * 100 / ProgressMax

Label2.Caption = "Loading" & Int(Progress * 100 / ProgressMax) & "%"

End If

Exit Sub

End Sub

Private Sub Form_Resize()

On Error Resume Next

WebBrowser1.Widht = Me.ScaleWidth

WebBrowser1.Height = Me.ScaleHeight - 1680

End Sub

8. klik f5 untuk melihat tampilannya

9. jika tidak ada masalah, klik file make webbrowser.exe

8

10. Jalankan.

Web Browser sederhana telah selesai dibuat.. Selamat mencoba!!

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s