Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As Integer
For x = 10000 To 1 Step -100
j_lembar.Items.Add(x)
Next
hpl.Items.Add(90)
hpl.Items.Add(100)
End Sub
Private Sub Buttonproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonproses.Click
If j_lembar.Text >= 200 Then
T_harga.Text = j_lembar.Text * HPL.Text
If T_harga.Text > 500000 Then
Discount.Text = 0.15 * T_harga.Text
End If
End If
Pembayaran.Text = T_harga.Text - Discount.Text
End Sub
Private Sub Buttonhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonhapus.Click
j_lembar.Text = ""
hpl.Text = ""
T_harga.Text = ""
Discount.Text = ""
Pembayaran.Text = ""
End Sub
Private Sub Button3keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3keluar.Click
Dim tanya As String
tanya = MsgBox("Apakah Anda ingin keluar??", MsgBoxStyle.Question + MsgBoxStyle.YesNo)
If tanya = vbYes Then
Me.Close()
Else
Exit Sub
End If
End Sub
End Class

0 opmerkings:
Plaas 'n opmerking