1
LAMPIRAN
Kode Program Menu Utama Dim LetakTengah As Integer Private Declare Function PlaySound Lib "winmm.dll" Alias _ "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, _ ByVal dwFlags As Long) As Long Public Function PlayWaveFile(strFileName As String, Optional blnAsync As Boolean) As Boolean Dim lngFlags As Long Const snd_sync = &H0 Const snd_Async = &H1 Const snd_Nodefault = &H2 Const snd_Filename = &H20000 lngFlags = snd_Nodefault Or snd_Filename Or snd_sync If blnAsync Then lngFlags = lngFlags Or snd_Async PlayWaveFile = PlaySound(strFileName, 0&, lngFlags) End Function Private Sub CDanddvdRom_Click() retval = PlayWaveFile(App.Path 20.wav", True) CDRom.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub
&
"\sound\button-
Private Sub Form_Load() Me.Top = Me.Height * -1 Me.Left = (Screen.Width - Me.Width) / 2 LetakTengah = (Screen.Height - Me.Height) / 2 Me.Timer1.Interval = 50 End Sub
Private Sub Hardisk_Click() retval = PlayWaveFile(App.Path 20.wav", True) HardiskForm.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50
&
"\sound\button-
Universitas Sumatera Utara
2
End Sub Private Sub keluar_click() retval = PlayWaveFile(App.Path & "\sound\button-20.wav", True) End End Sub Private Sub Keyboard_Click() retval = PlayWaveFile(App.Path 20.wav", True) Keyboardform.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub Private Sub Komputer_Click() retval = PlayWaveFile(App.Path 20.wav", True) SejarahKomputer.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub Private Sub Laptop_Click() retval = PlayWaveFile(App.Path 20.wav", True) Laptopform.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub Private Sub Memorikomputer_Click() retval = PlayWaveFile(App.Path 20.wav", True) memoriramform.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub Private Sub Monitor_Click() retval = PlayWaveFile(App.Path 20.wav", True) MonitorForm.Show LetakTengah = Me.Top Me.Top = Me.Top + 10
&
"\sound\button-
&
"\sound\button-
&
"\sound\button-
&
"\sound\button-
&
"\sound\button-
Universitas Sumatera Utara
3
Me.Timer2.Interval = 50 End Sub Private Sub Motherboard_Click() retval = PlayWaveFile(App.Path 20.wav", True) motherboardForm.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub Private Sub Mouse_Click() retval = PlayWaveFile(App.Path 20.wav", True) mouseform.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub Private Sub Processor_Click() retval = PlayWaveFile(App.Path 20.wav", True) Processorform.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub Private Sub tentangsaya_Click() retval = PlayWaveFile(App.Path 20.wav", True) tentangsayaform.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub
&
"\sound\button-
&
"\sound\button-
&
"\sound\button-
&
"\sound\button-
Private Sub Timer1_Timer() If Me.Top < LetakTengah Then Me.Top = Me.Top + ((LetakTengah - Me.Top) / 2) Else: Me.Top = LetakTengah Me.Timer1.Interval = 0 End If End Sub Private Sub Timer2_Timer() If Me.Top < Screen.Height Then Me.Top = Me.Top + ((Me.Top - LetakTengah) * 2)
Universitas Sumatera Utara
4
Else Unload Me End If End Sub
Universitas Sumatera Utara
5
Kode Program Halaman Baca Pada menu Komputer, Motherboard, Processor, Memori Komputer, Hardisk, CD dan DVD, Laptop, Monitor, Mouse, dan Keyboard, memiliki kode yang sama tetapi berbeda pada koneksi databasenya seperti di bawah ini. Dim LetakTengah As Integer Private Declare Function PlaySound Lib "winmm.dll" Alias _ "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, _ ByVal dwFlags As Long) As Long Public Function PlayWaveFile(strFileName As String, Optional blnAsync As Boolean) As Boolean Dim lngFlags As Long Const snd_sync = &H0 Const snd_Async = &H1 Const snd_Nodefault = &H2 Const snd_Filename = &H20000 lngFlags = snd_Nodefault Or snd_Filename Or snd_sync If blnAsync Then lngFlags = lngFlags Or snd_Async PlayWaveFile = PlaySound(strFileName, 0&, lngFlags) End Function Private Sub Form_Load() 'binding data k masing2 kontrol Set Judul.DataSource = Adodc1 Judul.DataField = "Menu" Set Isibuku.DataSource = Adodc1 Isibuku.DataField = "Keterangan" Set Gambar1.DataSource = Adodc1 Gambar1.DataField = "Gambar" Set Gambar2.DataSource = Adodc1 Gambar2.DataField = "Gambar2" Set Gambar3.DataSource = Adodc1 Gambar3.DataField = "Gambar3" Set Gambar4.DataSource = Adodc1 Gambar4.DataField = "Gambar4" Set Gambar5.DataSource = Adodc1 Gambar5.DataField = "Gambar5" ‘Source code Koneksi CD dan DVD ‘======================================================== ====== With Adodc1 'mengatur koneksi
Universitas Sumatera Utara
6
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from CDandDVDRom order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With ‘======================================================== ===== 'animasi form Me.Top = Me.Height * -1 Me.Left = (Screen.Width - Me.Width) / 2 LetakTengah = (Screen.Height - Me.Height) / 2 Me.Timer1.Interval = 50 End Sub Private Sub gantigambar_Click() On Error GoTo Ero With CommonDialog1 .CancelError = True .FileName = "" .Filter = "JPG Files|*.jpg" .ShowOpen Gambar1.Picture = LoadPicture(.FileName) Dim p As New ADODB.Stream p.Type = adTypeBinary p.Open p.LoadFromFile .FileName
'update gambar Adodc1.Recordset.Update "Gambar", p.Read p.Close End With Ero: End Sub Private Sub gantigambar2_Click() On Error GoTo Ero With CommonDialog1 .CancelError = True .FileName = "" .Filter = "JPG Files|*.jpg" .ShowOpen
Universitas Sumatera Utara
7
Gambar2.Picture = LoadPicture(.FileName) Dim p As New ADODB.Stream p.Type = adTypeBinary p.Open p.LoadFromFile .FileName
'update gambar Adodc1.Recordset.Update "Gambar2", p.Read p.Close End With Ero: End Sub Private Sub gantigambar3_Click() On Error GoTo Ero With CommonDialog1 .CancelError = True .FileName = "" .Filter = "JPG Files|*.jpg" .ShowOpen Gambar3.Picture = LoadPicture(.FileName) Dim p As New ADODB.Stream p.Type = adTypeBinary p.Open p.LoadFromFile .FileName
'update gambar Adodc1.Recordset.Update "Gambar3", p.Read p.Close End With Ero: End Sub Private Sub gantigambar4_Click() On Error GoTo Ero With CommonDialog1 .CancelError = True .FileName = "" .Filter = "JPG Files|*.jpg" .ShowOpen
Universitas Sumatera Utara
8
Gambar4.Picture = LoadPicture(.FileName) Dim p As New ADODB.Stream p.Type = adTypeBinary p.Open p.LoadFromFile .FileName
'update gambar Adodc1.Recordset.Update "Gambar4", p.Read p.Close End With Ero: End Sub Private Sub gantigambar5_Click() On Error GoTo Ero With CommonDialog1 .CancelError = True .FileName = "" .Filter = "JPG Files|*.jpg" .ShowOpen Gambar5.Picture = LoadPicture(.FileName) Dim p As New ADODB.Stream p.Type = adTypeBinary p.Open p.LoadFromFile .FileName
'update gambar Adodc1.Recordset.Update "Gambar5", p.Read p.Close End With Ero: End Sub Private Sub Hapus_Click() Gambar1.Picture = Nothing Gambar2.Picture = Nothing Gambar3.Picture = Nothing Gambar4.Picture = Nothing Gambar5.Picture = Nothing ' untuk menghapus gambar Adodc1.Recordset.Update "Gambar", Null Adodc1.Recordset.Update "Gambar2", Null
Universitas Sumatera Utara
9
Adodc1.Recordset.Update "Gambar3", Null Adodc1.Recordset.Update "Gambar4", Null Adodc1.Recordset.Update "Gambar5", Null End Sub Private Sub menu_Click() retval = PlayWaveFile(App.Path 20.wav", True) Awalform.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub
&
"\sound\button-
Private Sub Timer1_Timer() If Me.Top < LetakTengah Then Me.Top = Me.Top + ((LetakTengah - Me.Top) / 2) Else: Me.Top = LetakTengah Me.Timer1.Interval = 0 End If End Sub Private Sub Timer2_Timer() If Me.Top < Screen.Height Then Me.Top = Me.Top + ((Me.Top - LetakTengah) * 2) Else Unload Me End If End Sub
Universitas Sumatera Utara
10
Kode Program Masing-Masing Koneksi Untuk setiap menu, kode program sama dengan kode program halaman baca tetapi berbeda pada koneksinya. ‘Source code Koneksi Hardisk ‘======================================================== ====== With Adodc1 'mengatur koneksi .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from Hardisk_table order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With ‘======================================================== =====
‘Source code Koneksi Keyboard ‘======================================================== ====== With Adodc1 'mengatur koneksi .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from Keyboard_table order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With ‘======================================================== =====
‘Source code koneksi Laptop ‘======================================================== ====== With Adodc1 'mengatur koneksi .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from Laptop_Table order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With
Universitas Sumatera Utara
11
‘======================================================== =====
‘Source code koneksi Memori Komputer ‘======================================================== ====== With Adodc1 'mengatur koneksi .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from MemoriorRam_table order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With ‘======================================================== =====
‘Source code koneksi Monitor ‘======================================================== ====== With Adodc1 'mengatur koneksi .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from Monitor_table order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With ‘======================================================== =====
‘Source code Koneksi Motherboard ‘======================================================== ====== With Adodc1 'mengatur koneksi .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from Motherboard_table order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With ‘======================================================== =====
Universitas Sumatera Utara
12
‘Source code Koneksi Mouse ‘======================================================== ====== With Adodc1 'mengatur koneksi .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from Mouse_table order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With ‘======================================================== =====
‘Source code Koneksi Processor ‘======================================================== ====== With Adodc1 'mengatur koneksi .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from Processor_table order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With ‘======================================================== =====
‘Source code Koneksi Komputer ‘======================================================== ====== With Adodc1 'mengatur koneksi .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Ensiklopedikomputer.mdb;" .RecordSource = "select * from SejarahKomputer order by ID" Set DataGrid1.DataSource = Adodc1 .Refresh End With ‘======================================================== =====
Universitas Sumatera Utara
13
Kode Program Form Tentang Saya Dim LetakTengah As Integer Private Declare Function PlaySound Lib "winmm.dll" Alias _ "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, _ ByVal dwFlags As Long) As Long Public Function PlayWaveFile(strFileName As String, Optional blnAsync As Boolean) As Boolean Dim lngFlags As Long Const snd_sync = &H0 Const snd_Async = &H1 Const snd_Nodefault = &H2 Const snd_Filename = &H20000 lngFlags = snd_Nodefault Or snd_Filename Or snd_sync If blnAsync Then lngFlags = lngFlags Or snd_Async PlayWaveFile = PlaySound(strFileName, 0&, lngFlags) End Function Private Sub Form_Load() Me.Top = Me.Height * -1 Me.Left = (Screen.Width - Me.Width) / 2 LetakTengah = (Screen.Height - Me.Height) / 2 Me.Timer1.Interval = 50 End Sub Private Sub home_Click() retval = PlayWaveFile(App.Path 20.wav", True) Awalform.Show LetakTengah = Me.Top Me.Top = Me.Top + 10 Me.Timer2.Interval = 50 End Sub
&
"\sound\button-
Private Sub Timer1_Timer() If Me.Top < LetakTengah Then Me.Top = Me.Top + ((LetakTengah - Me.Top) / 2) Else: Me.Top = LetakTengah Me.Timer1.Interval = 0 End If End Sub Private Sub Timer2_Timer() If Me.Top < Screen.Height Then Me.Top = Me.Top + ((Me.Top - LetakTengah) * 2) Else Unload Me End If End Sub
Universitas Sumatera Utara
KEMENTERIAN PENDIDIKAN DAN KEBUDAYAAN UNIVERSITAS SUMATERA UTARA FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM Jln. Bioteknologi No. 1 Kampus USU Telp. (061) 8212050-8214920. Fax. (061) 8214290 Medan 20155
KARTU BIMBINGAN TUGAS AKHIR MAHASISWA Nama Nomor Induk Mahasiswa Judul Tugas Akhir
: REZA MAHARDI SIDABUTAR : 092406140 : APLIKASI ENSIKLOPEDIA UMUM MENGGUNAKAN VISUAL BASIC 6.0
Dosen Pembimbing
: Prof.Dr.Opim Salim Sitompul,M.Sc
Tanggal Mulai Bimbingan
:
Tanggal Selesai Bimbingan
:
No
TANGGAL BIMBINGAN
PEMBAHASAN ASISTENSI MENGENAI BAB
PARAF DOSEN PEMBIMBING
KETERANGAN
1 2 3 4 5 6 7
Kartu ini harap dikembalikan ke Departemen Matematika bila bimbingan mahasiswa telah selesai
Diketahui, Departemen Matematika FMIPA USU Ketua,
Disetujui, Pembimbing Utama/ Penanggung Jawab
Prof. Dr. Tulus, M.Si Nip. 19620901 198803 1 002
Prof.Dr.Opim Salim Sitompul,M.Sc NIP. 19610817 198701 1 001
Universitas Sumatera Utara
SURAT KETERANGAN Hasil uji program tugas akhir
Yang bertanda tangan di bawah ini, menerangkan bahwa Mahasiswa Tugas Akhir Program studi D3 Teknik Informatika:
Nama NIM Program Studi Judul Tugas Akhir
: : : :
REZA MAHARDI SIDABUTAR 092406140 D3 TEKNIK INFORMATIKA APLIKASI ENSIKLOPEDIA UMUM MENGGUNAKAN VISUAL BASIC 6.0
Telah melaksanakan tes program Tugas Akhir Mahasiswa tersebut di atas pada tanggal : Juni 2012
Dengan Hasil : SUKSES / GAGAL
Demikian diterangkan untuk digunakan melengkapi syarat pendaftaran Ujian Meja Hijau Tugas Akhir Mahasiswa bersangkutan di Departemen Matematika FMIPA USU Medan
Medan, Juni 2012 Dosen Pembimbing
Prof.Dr.Opim Salim Sitompul,M.Sc NIP. 19610817 198701 1 001
Universitas Sumatera Utara