下列程序执行后,在窗体上按下Alt+Ctrl+A键的输出结果为______。 Private Sub Form_KeyDown(Keycode As Integer, Shift As Integer) Print shift End Sub
举一反三
- 将窗体的KeyPreview属性设置为True,然后编写如下过程: Private Sub Form. KeyDown(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode) End Sub Private Sub Form_KeyUp(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode+2) End Sub 程序运行后,如果按“A”键,则输出的结果为 A.A A B.A B C.A C D.A D
- 窗体KeyUp事件过程如下,启动程序后按小写字母“a”,输出结果为______。 Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) Print Chr(KeyCode) End Sub
- 下列程序执行后,按住<Ctrl>键,并在文本框中输入“a”,则在窗体上输出结果为( )。 Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) Print KeyCode,Shift End Sub A: a 2 B: 65 2 C: 97 1 D: 97 2
- 把窗体的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”键(即不按住Shift键),则在窗体上输出的字符分别是______和______。
- 编写如下事件过程: Private Sub Form_Keydown(KeyCode As Integer, Shift As Integer) If (Button And 3) = 3 Then Print "AAAA" End If End Sub 程序运行后,为了在窗体上输出 “AAAA”,应按下的鼠标键为()。