Tugas 2.2
Perhitungan Mutu Menggunakan Keypress
Source Code :
Private Sub cmdHitung_Click()
Dim A, B, C As Double
txtB.Text = Val(txtA.Text) * 0.1
txtC.Text = Val(txtA.Text) - Val(txtB.Text)
End Sub
Private Sub cmdQuit_Click()
End
End Sub
Private Sub cmdUlang_Click()
txtA = ""
txtB = ""
txtC = ""
End Sub
Private Sub txtB_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim A, B, C As Double
txtB.Text = Val(txtA.Text) * 0.1
txtC.Text = Val(txtA.Text) - Val(txtB.Text)
End If
End Sub
Tidak ada komentar:
Posting Komentar