Lampiran 1 Form Utama Aplikasi Web Browser Dim counter As Integer Private Sub cmdBack_Click() WebBrowser1.GoBack End Sub Private Sub cmdBuka_Click() CommonDialog1.CancelError = True On Error GoTo Cancel CommonDialog1.Filter = "File HTM|*.HTM|_File HTML|*.HTML" CommonDialog1.ShowOpen If CommonDialog1.FileName <> "" Then WebBrowser1.Navigate CommonDialog1.FileName End If Exit Sub Cancel: Exit Sub End Sub Private Sub cmdForward_Click() WebBrowser1.GoForward End Sub Private Sub cmdGo_Click() WebBrowser1.Navigate Combo1 End Sub Private Sub cmdHome_Click() WebBrowser1.GoHome End Sub Private Sub cmdprint_Click() WebBrowser1.ExecWB OLECMDID_PRINT,OLECMDEXECOPT_DODEFAULT End Sub Private Sub cmdRefresh_Click() WebBrowser1.Refresh Text1.Text = WebBrowser1.LocationURL End Sub Private Sub cmdsave_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_SAVEAS, _ OLECMDEXECOPT_DODEFAULT End Sub
Universitas Sumatera Utara
Private Sub cmdStop_Click() WebBrowser1.Stop End Sub Private Sub Form_Load() WebBrowser1.Navigate ("http://www.google.com") End Sub Private Sub mabout_Click() Load Form3 Form3.Visible = True End Sub Private Sub mcopy_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_COPY, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub mcut_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_CUT, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub mdelete_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_DELETE, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub menunewwindow_Click() Dim Form1 As Form1 Set Form1 = New Form1 Set ppDisp = Form1.WebBrowser1.Object Form1.Show Combo1 = (WebBrowser1.LocationURL) Form1.Caption = (WebBrowser1.LocationName) End Sub Private Sub mexit_Click() Unload Form1 End Sub Private Sub mfullscreen_Click() Form1.WindowState = 2 End Sub Private Sub mopen_Click() CommonDialog1.CancelError = True
Universitas Sumatera Utara
On Error GoTo Cancel CommonDialog1.Filter = "File HTM|*.HTM|_File HTML|*.HTML" CommonDialog1.ShowOpen If CommonDialog1.FileName <> "" Then WebBrowser1.Navigate CommonDialog1.FileName End If Exit Sub Cancel: Exit Sub End Sub
Private Sub mpage_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_PAGESETUP, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub mpaste_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_PASTE, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub mprint_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_PRINT, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub mproperties_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_PROPERTIES, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub mredo_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_REDO, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub msave_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_SAVEAS, _ OLECMDEXECOPT_DODEFAULT End Sub
Universitas Sumatera Utara
Private Sub msavesource_Click() CommonDialog3.CancelError = True On Error GoTo Cancel CommonDialog3.Filter = "File HTM|*.HTM|_FileHTML|*.HTML" CommonDialog3.ShowSave If CommonDialog3.FileName <> "" Then strNamaFile = CommonDialog3.FileName intNoFile = FreeFile Open strNamaFile For Output As intNoFile Print #intFile, Inet1.OpenURL(Text1.Text) Close intNoFile End If Exit Sub Cancel: Exit Sub End Sub Private Sub mselectall_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_SELECTALL, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub msource_Click() Load Form2 Form2.Visible = True Form2.Text1.Text = Inet1.OpenURL(Combo1.Text) End Sub Private Sub mundo_Click() On Error Resume Next WebBrowser1.ExecWB OLECMDID_UNDO, _ OLECMDEXECOPT_DODEFAULT End Sub Private Sub Timer1_Timer() Dim Kalimat As String Kalimat = "WELCOME TO WEB BROWSER RIZKA" counter = counter + 1 DoEvents Label1.Caption = TulisJalan(counter, Kalimat, 24) End Sub Public Function TulisJalan(hitung As Integer, strKalimat As String, _Panjang As Integer) If hitung = Len(strKalimat) + Panjang Then hitung = 0 ElseIf hitung > Len(strKalimat) Then TulisJalan=strKalimat&Space(hitung- Len(strKalimat)) Else: TulisJalan = Mid(strKalimat,1, hitung)
Universitas Sumatera Utara
End If End Function Private String)
Sub
WebBrowser1_StatusTextChange(ByVal
Text
As
Combo1 = (WebBrowser1.LocationURL) Form1.Caption = (WebBrowser1.LocationName) End Sub Private Sub WebBrowser1_NewWindow2(ppDisp Cancel As Boolean) Dim Form1 As Form1 Set Form1 = New Form1 Set ppDisp = Form1.WebBrowser1.Object Form1.Show End Sub
As
Object,
Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant) On Error Resume Next Dim i As Integer Dim bFound As Boolean Form1.Caption = WebBrowser1.LocationName For i = 0 To Combo1.ListCount - 1 If Combo1.List(i) = WebBrowser1.LocationURL Then bFound = True Exit For End If Next i mbDontNavigateNow = True If bFound Then Combo1.RemoveItem i End If Combo1.AddItem WebBrowser1.LocationURL, 0 Combo1.ListIndex = 0 mbDontNavigateNow = False End Sub Private Sub Form_Resize() On Error Resume Next WebBrowser1.Width = Form1.ScaleWidth WebBrowser1.Height = Form1.ScaleHeight - 1680 End Sub Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long) On Error Resume Next If Progress = -1 Then ProgressBar.Value = 100 ProgressBar1.Visible = False
Universitas Sumatera Utara
If Progress > 0 And ProgressMax > 0 Then ProgressBar1.Visible = True ProgressBar1.Value = Progress * 100 / ProgressMax End If End Sub
Lampiran 2 Form Page Source Web Browser Private Sub Command1_Click() Unload Form2 End Sub
Lampiran 3
Form Biodata Penulis Dim counter As Integer Dim i As Long Dim merah, hijau, biru As Integer Private Sub Command1_Click() Unload Form3 End Sub Private Sub Form_Load() i = 0 'Inisialisasi detik Timer1.Interval= 100'Kalau 1000 biasanya lompat 1 detik Label1.Caption = "BIODATA PENULIS" End Sub Private Sub Timer1_Timer() i = i + 1 If i = 1000000 Then i = 0 'Supaya tdk overflow, dsb... merah=Int(255*Rnd)'Bangkitkan angka random untuk merah hijau = Int(255 * Rnd) 'Bangkitkan angka random untuk hijau biru = Int(255 * Rnd) 'Bangkitkan angka random untuk biru Label1.ForeColor = RGB(merah, hijau, biru)'Campur tiga warna If i Mod 2 = 0 Then 'Jika counter habis dibagi 2 Label1.Visible = True 'Tampilkan label
Universitas Sumatera Utara
Else 'Jika counter tidak habis dibagi 2 Label1.Visible = False 'Sembunyikan label End If 'Akhir pemeriksaan End Sub Private Sub Timer2_Timer() Dim Kalimat As String Kalimat = "UNIVERSITAS SUMATERA UTARA" counter = counter + 1 DoEvents Label6.Caption = TulisJalan(counter, Kalimat, 14) End Sub Public Function TulisJalan(hitung As Integer, strKalimat As String, _ Panjang As Integer) If hitung = Len(strKalimat) + Panjang Then hitung = 0 ElseIf hitung > Len(strKalimat) Then TulisJalan = strKalimat&Space(hitung-Len(strKalimat)) Else TulisJalan = Mid(strKalimat, 1, hitung) End If End Function
Universitas Sumatera Utara
KEMENTERIAN PENDIDIKAN NASIONAL
UNIVERSITAS SUMATERA UTARA FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM Jl. Bioteknologi No. 1 Kampus USU Telp. (061) 8214290, 8211212, 8211414 Fax. (061) 8214290 Medan 20155
Kartu Bimbingan Tugas Akhir Mahasiswa Nama
: NURHANI ERISKANIATI HARAHAP
Nomor Induk Mahasiswa
: 072406045
Judul Tugas Akhir
: Perancangan Aplikasi Web Browser Menggunakan Microsoft Visual Basic 6.0
Dosen Pembimbing
: Drs. Bambang Irawan, M.Sc
Tanggal Mulai Bimbingan
: 6 Maret 2010
Tanggal Selesai Bimbingan : 2 Juni 2010 No 1
Tanggal Bimbingan 3 Maret 2010
Pembahasan Asistensi Mengenai Bab Pengajuan Proposal
2 3 4
6 Maret 2010 14 April 2010 17 April 2010
ACC Proposal Pengajuan Bab 1 – Bab 5 Perbaikan Bab 1 – Bab 5
5 6 7
19 Mei 2010 2 Juni 2010 2 Juni 2010
Perbaikan Bab 1 – Bab 5 ACC Bab 1 – Bab 5 Uji Program
Paraf Dosen Pembimbing
Keterangan
*Kartu ini harap dikembalikan ke Departemen Matematika bila bimbingan mahasiswa telah selesai
Universitas Sumatera Utara
SURAT KETERANGAN Hasil Uji Program Tugas Akhir
Yang bertanda tangan dibawah ini, menerangkan bahwa Mahasiswa Tugas Akhir Program Diploma III Ilmu Komputer :
Nama
: NURHANI ERISKANIATI HRP
NIM
: 072406045
Prog. Studi
: Ilmu Komputer
Judul TA
: PERANCANGAN APLIKASI WEB BROWSER MENGGUNAKAN MICROSOFT VISUAL BASIC 6.0
Telah melaksanakan test program Tugas Akhir Mahasiswa tersebut di atas pada tanggal
Dengan Hasil :
Sukses/Gagal
Demikian diterangkan untuk digunakan melengkapi syarat pendaftaran Ujian Meja Hijau Tugas Akhir Mahasiswa bersangkutan di Departemen Matematika FMIPA USU Medan.
Universitas Sumatera Utara