Tugas 3.3 Membuat Penjualan Tiket Kereta Api


Tugas 3.3 Membuat Penjualan Tiket Kereta Api Menggunakan Microsoft Visual Basic 6.0
Berikut adalah sourcecode untuk aplikasi diatas :

Private Sub cmdkeluar_Click()
End
End Sub
------------------------------------------------

Private Sub cmdlagi_Click()
txtkt = ""
txtht = ""
txtjk = ""
txtjb = ""
txtjt = ""
txttotalb = ""
End Sub
------------------------------------------------ 
Private Sub cmdproses_Click()
Dim kode As String

kode = Left(txtkt.Text, 3)
If kode = "BIM" Then
txtht.Text = "50000"
txtjk.Text = "BIMA"
txtjb.Text = "16.00"
ElseIf kode = "EKO" Then
txtht.Text = "35000"
txtjk.Text = "EKONOMI"
txtjb.Text = "19.00"
ElseIf kode = "MUT" Then
txtht.Text = "23000"
txtjk.Text = "MUTIARA"
txtjb.Text = "17.00"
ElseIf kode = "SEN" Then
txtht.Text = "15000"
txtjk.Text = "SENJA"
txtjb.Text = "20.00"
End If
txtjt.SetFocus
End Sub
------------------------------------------------
Private Sub Form_Load()
txtht.Enabled = False
txtjk.Enabled = False
txtjb.Enabled = False
txttotalp.Enabled = False
End Sub
------------------------------------------------
Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotalp = Val(txtht) * Val(txtjt)
End If
End Sub

Related Posts:

0 Response to "Tugas 3.3 Membuat Penjualan Tiket Kereta Api"

Posting Komentar