单选题 将窗体的KeyPreview属性设为True,然后编写如下程序: Private 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 Sub运行程序时,按下字母键a,则窗体上显示的是( )。
【正确答案】 B
【答案解析】解析:KeyCode是按键的实际字符(不区分大小写),Key.Ascii是以字符为准,是所按键的ASCII码。