Rabu, 16 Maret 2011

Membuat Mesin Kasir Sederhana Menggunakan Vb6.0

Aplikasi mesin kasir sederhana ini untuk mempermudahkan kita melakukan kegiatan jual dan beli.. pasti kalu tidak ada alat seperti ini ( Mesin Kasir ) kita 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


Semua rincian itu bisa anda ubah sesuka hati anda ..
Bila anda sudah membuat Form dan Rancangan seperti di atas , sekarang Tinggal memasukan kode ke dalam 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 = ""
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

0 komentar:

Posting Komentar

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites