Di Bawah Ini Adalah Cara Membuat Aplikasi Kasirnya ::
1) Buatlah Tampilan Aplikasi Kasir Seperti Gambar Di Bawah Ini :
2) Sesuaikan Propertinya Sebagai Berikut :
1 | Name : lblTanggal | Caption : - |
2 | Name : lblJam | Caption : - |
3 | Name : txtId | Text : - |
4 | Name : txtMenu | Text : - |
5 | Name : txtSatuan | Text : - |
6 | Name : txtHarga | Text : - |
7 | Name : txtPesanan | Text : - |
8 | Name : txtTotal | Text : - |
9 | Name : txtBayar | Text : - |
10 | Name : txtKembali | Text : - |
11 | Name : cmdBaru | Caption : Menu Baru |
12 | Name : cmdTutup | Caption : Tutup |
13 | Name : Timer1 | Interval : 1 |
3) Tulislah Source Code Sesuai Dengan Fungsinya Masing-Masing.
Klik 2x Timer1 Dan Copas Kode Di Bawah Ini :
Private Sub Timer1_Timer()
lblTanggal.Caption = Format(Date, "dd mmmm yyyy")
lblJam.Caption = Format(Time, "hh:mm:ss")
End Sub
Klik 2x txtId.text Dan Isi Kode Berikut :
Private Sub txtId_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If txtId.Text = 101 Then
txtMenu.Text = "Sate Manusia"
txtSatuan.Text = "Porsi"
txtHarga.Text = 15000
ElseIf txtId.Text = 102 Then
txtMenu.Text = "Kebab"
txtSatuan.Text = "Porsi"
txtHarga.Text = 10000
ElseIf txtId.Text = 103 Then
txtMenu.Text = "Soto Indomie"
txtSatuan.Text = "Porsi"
txtHarga.Text = 17000
ElseIf txtId.Text = 104 Then
txtMenu.Text = "Dodol Garut Yahut"
txtSatuan.Text = "Porsi"
txtHarga.Text = 20000
Else
MsgBox ("Menu yang dipesan belum ada...!")
End If
txtPesanan.SetFocus
End If
End Sub
Klik 2x txtPesanan.text Dan Isi Kode Di Bawah Ini :
Private Sub txtPesanan_Change()
txtTotal.Text = Val(txtHarga.Text) * Val(txtPesanan.Text)
End Sub
Klik 2x txtBayar.text dan copas source code berikut :
Private Sub txtBayar_Change()
txtKembali.Text = Val(txtBayar.Text) - Val(txtTotal.Text)
End Sub
Klik 2x cmdBaru, Isi Dengan Kode Berikut
Private Sub cmdBaru_Click()
txtId.Text = ""
txtMenu.Text = ""
txtSatuan.Text = ""
txtHarga.Text = ""
txtPesanan.Text = ""
txtTotal.Text = ""
txtBayar.Text = ""
txtKembali.Text = ""
txtId.SetFocus
End Sub
Klik 2x cmdTutup, Isi Dengan Kode Berikut :\
Private Sub cmdTutup_Click()
Unload Me
End Sub
4) Terakhir Tinggal Kalian Klik Tombol F5
Dan Ini Adalah Hasilnya ::
Semoga Membantu!!
TERIMA KASIH
(***)
Tidak ada komentar:
Posting Komentar