16/05/16

Cara Membuat Aplikasi Kasir Menggunakan Visual Studio 2010

Kali Ini Gua Akan Berbagi Bagaimana Caranya Membuat Aplikasi Kasir Sendiri Menggunakan Visual Studio 2010.

Di Bawah Ini Adalah Cara Membuat Aplikasi Kasirnya ::




1) Buatlah Tampilan Aplikasi Kasir Seperti Gambar Di Bawah Ini :





2) Sesuaikan Propertinya Sebagai Berikut :


1Name : lblTanggalCaption : -
2Name : lblJamCaption : -
3Name : txtIdText : -
4Name : txtMenuText : -
5Name : txtSatuanText : -
6Name : txtHargaText : -
7Name : txtPesananText : -
8Name : txtTotalText : -
9Name : txtBayarText : -
10Name : txtKembaliText : -
11Name : cmdBaruCaption : Menu Baru
12Name : cmdTutupCaption : Tutup
13Name : Timer1Interval : 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