VB简单作业,求大神们帮助啊!

2024-12-03 09:00:09
推荐回答(1个)
回答1:

Private Sub Form_Load()
Text2.Locked = False
Text3.Locked = False
End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2 = Val(Text2) + 1
Text3 = Val(Text3) + Val(Text1)
Text1.SelStart = 0
Text1.SelLength = Len(Text1)
If Val(Text1) > 0 Then Text1 = ""
End If
End Sub