Membuat Aplikasi AGEN BUS Sederhana

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Buat Design Form Sebagai berikut:

Object Propertis Setting


Form1 Caption Tugas Final
Picture Pilih Gambar Sesuai Keinginan
StartUpPostion 2 – CenterScreen
Label1 Caption AGEN BUS
Font & ForeColor Pilih Sesuai Keinginan
Label2 Caption JL. Gatot Subroto Wonomulyo
Telp (021) 7584543
Timer1 Interval 100
Label3 Caption Jam :
Label4 Caption Tulisan Label4 di hapus
Line1 BorderWidth 2
ComboBox1 Name cbokode
Text Tulisan Combo1 di hapus
TextBox1 Name txtnama
Text Tulisan Text1 di hapus
Frame1 Caption Pilihan
Option1 Name optpagi
Caption PAGI
Option2 Name optsiang
Caption SIANG
Option3 Name optmalam
Caption MALAM
TextBox2 Name txtharga
Text Tulisan Text2 di hapus
TextBox3 Name txtjumbel
Text Tulisan Text3 di hapus
TextBox4 Name txttbay
Text Tulisan Text4 di hapus
TextBox5 Name txtubay
Text Tulisan Text5 di hapus
TextBox6 Name txtukem
Text Tulisan Text6 di hapus
Command1 Name cmdlagi
Caption LAGI
Command2 Name cmdkeluar
Caption KELUAR

LISTING PROGRAM

Private Sub cmdlagi_Click()


optpagi = 0
optsiang = 0
optmalam = 0
cbokode = ""
txtnama = ""
txtharga = ""
txtjumbel = ""
txttbay = ""
txtubay = ""
cbokode.SetFocus
End Sub

Private Sub cmdkeluar_Click()


End
End Sub

Private Sub cbokode_Click()


If cbokode.ListIndex = 0 Then txtnama = "Sinar Jaya"
If cbokode.ListIndex = 1 Then txtnama.Text = "Dedy Jaya"
If cbokode.ListIndex = 2 Then txtnama.Text = "Dewi Sri"
cbokode.SetFocus
End Sub

Private Sub Form_Load()


With cbokode
.AddItem "SJ"
.AddItem "DD"
.AddItem "DW"
End With
End Sub

Private Sub Timer1_Timer()


lbljam.Caption = Format(Time, "hh:mm:ss AM/PM")
End Sub

Private Sub optpagi_Click()


txtharga = 75000
End Sub

Private Sub optsiang_Click()


txtharga = 85000
End Sub

Private Sub optmalam_Click()


txtharga = 90000
End Sub

Private Sub txtjumbel_Change()


txttbay = Val(txtharga) * Val(txtjumbel)
txtubay.SetFocus
End Sub

Private Sub txtubay_Change()


txtukem = Val(txtubay) - Val(txttbay)
End Sub

You might also like