我用过1个回答计算结果的回车键:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = (a + b + c) Then GoTo 58
If Text1.Text <> (a + b + c) Then GoTo 59
End If
Exit Sub ' 结束以上程序
58:
Label4.Visible = True
Label5.Visible = False
Exit Sub ' 结束以上程序
59:
Label4.Visible = False
Label5.Visible = True
Text1.Text = ""
End Sub
这个显示:ASCII 介码
Private Sub Form_KeyPress(KeyAscii As Integer)
Label1.Caption = KeyAscii
End Sub