Tugas 3.1 Membuat Entri Penjualan Laptop Apple VB.6

Tampilan saat aplikasi running

Tugas 3.1 Membuat Entri Penjualan Laptop Apple Menggunakan Microsoft Visual Basic 6.0

Berikut adalah sourcecode untuk aplikasi diatas :


Private Sub Cbokode_Click()
Dim kode As String
Dim merk, harga As String


Select Case Cbokode.Text
Case "Apple MC965 MacBook Air"
merk = "Apple MacBook Air MC965"
harga = "12800000"

Case "Apple MC966 MacBook Air"
merk = "Apple MacBook Air MC966"
harga = "15800000"

Case "Apple MC968 MacBook Air"
merk = "Apple MacBook Air MC968"
harga = "9900000"

Case "Apple MC969 MacBook Air"
merk = "Apple MacBook Air MC969"
harga = "11900000"

Case "Apple MC700 MacBook Pro"
merk = "Apple MacBook Pro MC700"
harga = "10800000"

Case "Apple MC721 MacBook Pro"
merk = "Apple MacBook Pro MC721"
harga = "15900000"

Case "Apple MC723 MacBook Pro"
merk = "Apple MacBook Pro MC723"
harga = "19300000"

Case "Apple MC724 MacBook Pro"
merk = "Apple MacBook Pro MC724"
harga = "13700000"

Case "Apple MC311 MacBook Pro"
merk = "Apple MacBook Pro MC311"
harga = "24200000"

Case "Apple MC313 MacBook Pro"
merk = "Apple MacBook Pro MC313"
harga = "11900000"

Case "Apple MC314 MacBook Pro"
merk = "Apple MacBook Pro MC314"
harga = "14700000"

Case "Apple MC318 MacBook Pro"
merk = "Apple MacBook Pro MC318"
harga = "17600000"

Case "Apple MC322 MacBook Pro"
merk = "Apple MacBook Pro MC322"
harga = "21300000"
----------------------------------------------------------- 
End Select
Txtmerk.Text = merk
Txths.Text = harga
Txtjj.SetFocus
End Sub
------------------------------------------------------------
Private Sub cmdKeluar_Click()
Unload Me
End Sub
-----------------------------------------------------------
Private Sub cmdLagi_Click()
Cbokode = ""
Txtmerk = ""
Txths = ""
Txtjj = ""
Txthp = ""
Txtdis = ""
Txttotal = ""
End Sub
------------------------------------------------------------
Private Sub cmdProses_Click()
Dim dis As String
Txthp = Val(Txtjj) * Val(Txths)

Select Case Txthp.Text
Case Is > 140000000
dis = Val(Txthp) * 0.15
Case Is > 135000000
dis = Val(Txthp) * 0.1
Case Is > 130000000
dis = Val(Txthp) * 0.05
Case Is > 120000000
dis = Val(Txthp) * 0.02
End Select
Txtdis.Text = dis

Txttotal = Val(Txthp) - Val(Txtdis)
End Sub
------------------------------------------------------------
Private Sub Form_Load()
Txtmerk.Enabled = False
Txths.Enabled = False
Txthp.Enabled = False
Txtdis.Enabled = False
Txttotal.Enabled = False

Cbokode.AddItem "Apple MC965 MacBook Air"
Cbokode.AddItem "Apple MC966 MacBook Air"
Cbokode.AddItem "Apple MC968 MacBook Air"
Cbokode.AddItem "Apple MC969 MacBook Air"
Cbokode.AddItem "Apple MC700 MacBook Pro"
Cbokode.AddItem "Apple MC721 MacBook Pro"
Cbokode.AddItem "Apple MC723 MacBook Pro"
Cbokode.AddItem "Apple MC724 MacBook Pro"
Cbokode.AddItem "Apple MC311 MacBook Pro"
Cbokode.AddItem "Apple MC313 MacBook Pro"
Cbokode.AddItem "Apple MC314 MacBook Pro"
Cbokode.AddItem "Apple MC318 MacBook Pro"
Cbokode.AddItem "Apple MC322 MacBook Pro"
End Sub

Related Posts:

0 Response to "Tugas 3.1 Membuat Entri Penjualan Laptop Apple VB.6"

Posting Komentar