Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cbtujuan.Items.Clear()
cbtujuan.Items.Add("JAKARTA")
cbtujuan.Items.Add("SURABAYA")
cbtujuan.Items.Add("MAKASSAR")
cbtujuan.Items.Add("BALI")
End Sub
Private Sub cbtujuan_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbtujuan.SelectedIndexChanged
If cbtujuan.Text = "JAKARTA" Then
txtharga.Text = 1500000
ElseIf cbtujuan.Text = " SURABAYA" Then
txtharga.Text = 1700000
ElseIf cbtujuan.Text = "MAKASSAR" Then
txtharga.Text = 1900000
ElseIf cbtujuan.Text = "BALI" Then
txtharga.Text = 2000000
Else
MsgBox("MASUKKAN TUJUAN")
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Jumlah As Integer
Jumlah = Val(txtharga.Text) * Val(txtjp.Text)
TextBox1.Text = Jumlah
End Sub
Private Sub Label8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label8.Click
End Sub
Private Sub Label10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label10.Click
End Sub
End Class
Komentar
Posting Komentar