NIM
Kelas/Semester
PEMROGRAMAN VISUAL
Modul Project UAS Kode soal S01
Buat sebuah aplikasi baru (File | New Project | Standard EXE)
Form1 (form_nomor 1)
1. Masukan 7 Label, 7 TextBox,2 CommandButton
2. Gantilah properties masing-masing komponen seperti tertera dibawah ini :
Object
Form1
CommandButton1
CommandButton2
TextBox1
TextBox2
TextBox3
TextBox4
TextBox5
TextBox6
TextBox7
Label1
Label2
Label3
Label4
Label5
Label6
Label7
Properties
Caption
Caption
Caption
Text
Name
Text
Name
Text
Name
Text
Name
Text
Name
Text
Name
Text
Name
Caption
Caption
Caption
Caption
Caption
Caption
Caption
Value
Nomor1
Proses
Keluar
<kosong>
TxtNIP
<kosong>
TxtNama
<kosong>
TxtAlamat
<kosong>
TxtTelp
<kosong>
TxtJMK
<kosong>
TxtSKS
<kosong>
TxtBayaran
NIP
Nama
Alamat
Nomor Telp
Jumlah mata kuliah
Jumlah SKS
Bayaran/MK
Form2 (form2_nomor 3)
1. Masukan 2 Label, 1 TextBox, 2 CommandButton, 1 Frame, 1 ComboBox, 6 Option
Button
2. Gantilah properties masing-masing komponen seperti tertera dibawah ini :
Object
Form3
Label1
Label2
TextBox1
CommandButton1
CommandButton2
Frame1
ComboBox1
OptionButton1
OptionButton2
OptionButton3
OptionButton4
OptionButton5
OptionButton6
Properties
Caption
Caption
Caption
Text
Name
Caption
Caption
Caption
Text
Name
Caption
Caption
Caption
Caption
Caption
Caption
Value
Nomor3
Pilih Hari
Nama Hari
<kosong>
TxtHari
Proses
Keluar
Hari Ke
<kosong>
cmbHari
I
II
III
IV
V
VI
cmbHari.AddItem "Selasa"
cmbHari.AddItem "Rabu"
cmbHari.AddItem "Kamis"
cmbHari.AddItem "Jumat"
cmbHari.AddItem "Sabtu"
cmbHari.ListIndex = 0
End Sub
5. Masukan code pada ComboBox1 untuk pilih
Private Sub cmbHari_Click()
Select Case cmbHari.ListIndex
Case 0
txtHari.Text = cmbHari.Text
Option1.Value = True
harike = " I "
Case 1
txtHari.Text = cmbHari.Text
Option2.Value = True
harike = " II "
Case 2
txtHari.Text = cmbHari.Text
Option3.Value = True
harike = " III "
Case 3
txtHari.Text = cmbHari.Text
Option4.Value = True
harike = " IV "
Case 4
txtHari.Text = cmbHari.Text
Option5.Value = True
harike = " V "
Case 5
txtHari.Text = cmbHari.Text
Option1.Value = True
harike = " VI "
End Select
End Sub
6. Masukan code pada CommandButton Proses
Private Sub Command1_Click()
Dim Pesan As String
Pesan = " Nama Hari : " & txtHari.Text & " Hari ke:" & harike
MsgBox Pesan
End Sub
7. Deklarasikan harike
Dim harike As String
8. Masukan code untuk CommandButton Keluar
Unload Me
9. Tekan F5 untuk menjalankan program (Running)
Louisa V.F Ngantung 4
Project UAS Semester IV Pemrogramam Visual Basic
Form3 (form3_nomor 2)
1. Masukan 2 Label, 2 TextBox, 2 CommandButton, 1 ListBox, 1 Frame
2. Gantilah properties masing-masing komponen seperti tertera dibawah ini :
Object
Form3
CommandButton1
CommandButton1
Label1
Label2
Frame1
TextBox1
TextBox2
Properties
Caption
Caption
Caption
Caption
Caption
Caption
Text
Name
Text
Name
Value
Nomor 2
Proses
Keluar
Banyaknya Looping
Perkalian
Jenis Looping For Next
<kosong>
Text1
<kosong>
Text2
ListBox1
Form4 (form4_nomor 4)
1. Masukan 3 Label, 5 TextBox, 3 CommandButton, 2 Frame
2. Gantilah properties masing-masing komponen seperti tertera dibawah ini :
Object
Form1
CommandButton2
CommandButton1
CommandButton3
Label1
Label2
Label3
TextBox1
TextBox2
TextBox3
TextBox4
TextBox5
Frame1
Frame2
Properties
Caption
Caption
Caption
Caption
Name
Caption
Caption
Caption
Text
Name
Text
Name
Text
Name
Text
Name
Text
Name
Caption
Caption
Value
Nomor 4
Konversi ke Celcius
=
Keluar
cmdExit
Konversi Suhu Fahrenheit ke
Celcius
Suhu Fahrenheit
*
<kosong>
TxtFahrenheit
<kosong>
TxtCelcius
<kosong>
TxtA
<kosong>
TxtB
<kosong>
TxtHasil
Procedure
Function
Form5 (form5_nomor 5)
Sebelum membuat aplikasi, kita merancang desain database sederhana.
Microsoft Access | File | New | Blank Database
Simpan File Access di Folder anda, dengan nama filenya Database
Create 2 Tabel, Tabel Barang dan Tabel Pembelian
menambah komponen baru (Project | Components | Microsoft ADO Data Control 6.0
(OLEDB); Microsoft Datagrid Control 6.0 (OLEDB); Microsoft Windows Common
Controls-2 6.0 (SP4),
5. Masukan 9 Label, 8 TextBox, 11 CommandButton, 2 Frame, 1 DTPicker, 2
DataGrid, 2 Adodc
1. Gantilah properties masing-masing komponen seperti tertera dibawah ini :
1.
2.
3.
4.
Object
Form5
Label1
Label2
Label3
Label4
Label5
Label6
Properties
Caption
Caption
Caption
Caption
Caption
Caption
Caption
Label7
Caption
Label8
Label9
CommandButton1
Caption
Caption
Caption
Name
Caption
Name
Caption
Name
Caption
Name
Caption
Name
Caption
CommandButton2
CommandButton3
CommandButton4
CommandButton5
CommandButton6
Value
Nomor 5
Kode Barang
Nama Barang
Harga
Masukan Kode Barang
Status Barang
Masukan Jumlah barang yang
diinginkan
Total Bayar (Jumlah
Barang*Harga)
Tanggal Transaksi
Harga
Tambah
cmdTambahBarang
Simpan
cmdSimpanBarang
Ubah
cmdEditBarang
Hapus
cmdHapusBarang
Tambah
cmdTambahPembelian
Cari Data
Louisa V.F Ngantung 9
Project UAS Semester IV Pemrogramam Visual Basic
CommandButton7
CommandButton8
CommandButton9
CommandButton10
CommandButton11
Frame1
Frame2
TextBox1
TextBox2
TextBox3
TextBox4
TextBox5
TextBox6
TextBox7
TextBox8
DTPicker1
Adodc1
Name
Caption
Name
Caption
Name
Caption
Name
Caption
Name
Caption
Name
Caption
Caption
Text
Name
Text
Name
Text
Name
Text
Name
Text
Name
Text
Name
Text
Name
Text
Name
Format
Caption
cmdCariData
Hitung Total
cmdHitungTotal
Hapus
cmdHapusBarang
Simpan
cmdSimpanBarang
Ubah
cmdEditBarang
Keluar
Comandbutton11
Informasi Barang
Informasi Pembelian
<kosong>
Text1
<kosong>
Text2
<kosong>
Text3
<kosong>
Text4
<kosong>
Text5
<kosong>
Text6
<kosong>
Text7
<kosong>
Text8
1 dtpShortDate
Pengolahan Informasi Barang
ConnectionString
RecordSource :
a. Command Type
b. Table or Store
Procedurev Name
Adodc2
DataGrid1
DataGrid2
Provider=Microsoft.Jet.OLEDB.4.0;Data
C:\Users\user\Desktop\Louisa V.F
Ngantung\Database.mdb;Persist
Security Info=False
2 AdCmdTable
Barang
Caption
ConnectionString
RecordSource :
a. Command Type
b. Table or Store
Procedurev Name
Provider=Microsoft.Jet.OLEDB.4.0;Data
C:\Users\user\Desktop\Louisa V.F
Ngantung\Database.mdb;Persist
Security Info=False
2 AdCmdTable
Pembelian
Caption
Allow Update
DataSource
Caption
Allow Update
Adodc2
DataSource
.cmdTambahPembelian.Enabled = False
.cmdSimpanPembelian.Enabled = True
.cmdHapusPembelian.Enabled = False
.cmdUbahPembelian.Enabled = False
.cmdCariData.Enabled = True
.cmdHitungTotal.Enabled = True
End With
End Sub
11. Buat prosedur editBarang
Private Sub editBarang()
With Nomor5
.cmdTambahBarang.Enabled = False
.cmdSimpanBarang.Enabled = True
.cmdHapusBarang.Enabled = False
.cmdEditBarang.Enabled = False
End With
End Sub
12. Buat prosedur ubahPembelian
Private Sub ubahPembelian()
With Nomor5
stateNew = True
.cmdTambahPembelian.Enabled = False
.cmdSimpanPembelian.Enabled = True
.cmdHapusPembelian.Enabled = False
.cmdUbahPembelian.Enabled = False
.cmdCariData.Enabled = True
.cmdHitungTotal.Enabled = True
End With
End Sub