Tugas 2 Program 2 (Perhitungan Harga Setelah Diskon dengan Keypress)





Private Sub Command1_Click()
Text2.Text = Text1.Text * 0.15
Text3.Text = Text1.Text - Text2.Text

End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Text1_keypress(keyescii As Integer)
If keyescii = 13 Then
Text2.Text = Text1.Text * 0.15
Text3.Text = Text1.Text - Text2.Text
End If

End Sub

0 komentar: