Public Class Form1
// coding untuk tipe sepatu
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Select Case ComboBox1.Text
Case "AR-62"
TextBox1.Text = 500000
Case "BIB"
TextBox1.Text = 250000
Case "SEpoRT"
TextBox1.Text = 300000
Case "Gagan 1"
TextBox1.Text = 1500000
Case "Gagan 2"
TextBox1.Text = 1000000
Case "Agan2"
TextBox1.Text = 600000
End Select
End Sub
//coding untuk diskon
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
TextBox2.Text = TextBox1.Text * 0.15
ElseIf CheckBox1.Checked = False Then
TextBox2.Text = 0
End If
End Sub
// coding untuk jumlah diskon dan proses
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox3.Text = TextBox1.Text - TextBox2.Text
End Sub
//coding untuk input data
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
CheckBox1.Checked = False
ComboBox1.Focus()
End Sub
//coding untuk keluar
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim x As Integer
x = MsgBox("Yakin Mau Keluar??", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Konfirmasi")
If x = vbYes Then
End
End If
End Sub
End Class
dan tampilan program adalah seperti berikut:
tampilan program setelah dijalankan: