Membuat Mesin Kasir Dengan VB

Anda mungkin juga menyukai

Anda di halaman 1dari 3

By Agus Saputra www.visualbasicfree.blogspot.

com

Aplikasi mesin kasir sederhana ini untuk mempermudahkan kita melakukan kegiatan jual dan
beli.. pasti kalu tidak ada alat seperti ini ( Mesin Kasir ) kitta pasti repot..
untuk membuat aplikasi yang kita butuhkan adalah Microsoft Visual Basic 6.0.
langsung aja ya ke tahap pembuatan..Pertama anda harus membuka aplikasi Visual Basic 6.0.

Setelah itu Buat Rancangan Form dengan komponen & property seprti yang di bwah ini




By Agus Saputra www.visualbasicfree.blogspot.com















Semua rincian itu bisa anda ubah sesuka hati anda ..
Bila anda sudah membuat Form dan Rancangan seperti diatas , sekarang Tinggal memasukan
kode kedalam lembar kerja kode , berikut kodenya !

Private Sub Command1_Click()
If Text1.Text = "" Then
pesan = MsgBox("Nama Barang masih kosong , Mohon Diisi !!", vbInformation, "Peringatan")
End If
If Text2.Text = "" Then
pesan = MsgBox("Harga masih kosong , Mohon Diisi !!", vbInformation, "Peringatan")
End If
If Text3.Text = "" Then
pesan = MsgBox("Jumlah masih kosong , Mohon Diisi !!", vbInformation, "Peringatan")

Else
a = Int(Text2.Text)
b = Int(Text3.Text)


Text4.Text = a * b
Label6.Visible = True
Label9.Visible = True
Label9.Caption = a * b
Label8.Visible = True
End If
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
By Agus Saputra www.visualbasicfree.blogspot.com

Text4.Text = ""
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
Label9.Caption = ""
End Sub

Private Sub Command3_Click()
d = Int(Text4.Text)
e = Int(Text5.Text)
f = e - d

Label9.Visible = True
Label9.Caption = f
Label7.Visible = True
Label8.Visible = True
End Sub

Private Sub Command4_Click()
Text5.Text = ""
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
Label9.Caption = ""
End Sub

Private Sub Command5_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
Label9.Caption = ""
End Sub

Private Sub Form_Load()
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
End Sub

Selamat Mencobanya !!

Anda mungkin juga menyukai