用VB 怎样编写下面这个程序:从键盘上输入字符时,在窗体上显示出所键入的字符和该字符的ASCII码值。

如键盘按a结果: ASCII:65,字符:A
2024-12-18 12:30:35
推荐回答(1个)
回答1:

Private Sub Form_KeyPress(KeyAscii As Integer)
Print "Ascii: " & KeyAscii & ", 字符:" & Chr(KeyAscii)
End Sub