Tugas 2.2 perhitungan harga setelah diskon 10% menggunakan keypress
Source kode :
Private Sub cmdhitung_Click()
txtdis = Val(txtha) * 0.1
txthk = Val(txtha) - (txtdis)
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub cmdlagi_Click()
txtha = ""
txtdis = ""
txthk = ""
End Sub
Private Sub txtha_keypress(keyascii As Integer)
If keyascii = 13 Then
txtdis = Val(txtha) * 0.1
txthk = Val(txtha) - (txtdis)
End If
End Sub
Tidak ada komentar:
Posting Komentar