把窗体的KeyPreview属性设置为True,然后编写如下两个事件过程: Prirate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Print Chr(Keycode) End Sub Private Sub Form_KeyPress(KeyAscii As Integer) Print Chr(KeyAscii) End S
主观题
把窗体的KeyPreview属性设置为True,然后编写如下两个事件过程: Prirate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Print Chr(Keycode) End Sub Private Sub Form_KeyPress(KeyAscii As Integer) Print Chr(KeyAscii) End S