Tugas 2.2 Perhitungan Harga Setelah Diskon 10%
Menggunakan Keypress
Berikut Source Codenya:
Private Sub cmdhitung_Click()
txtdis = Val(txtha) * 0.1
txthak = Val(txtha) - (txtdis)
End Sub
Private Sub cmdreset_Click()
txtha = ""
txtdis = ""
txthak = ""
txtha.SetFocus
End Sub
'17100003 renaldi zainal arifin
Private Sub cmdquit_Click()
Unload Me
End Sub
Private Sub txtha_keypress(keyascii As Integer)
If keyascii = 13 Then
txtdis = Val(txtha) * 0.1
txthak = Val(txtha) - (txtdis)
End If
End Sub
End Sub
0 komentar:
Posting Komentar