更多"将窗体的KeyPreview属性设置为True,然后编写如下过程: "的相关试题:
[单项选择]把窗体的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
[单项选择]把窗体的KeyPreview属性设置为True,然后编写如下事件过程
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim ch As String
ch=Chr(KeyAscii)
KeyAscii=Asc(UCase(ch))
PrintChr(KeyAscii+2)
End Sub
程序运行后,按键盘上的“A”键,则在窗体上显示的内容是
A. A
B. B
C. C
D. D
[单项选择]把窗体的KeyPreview属性设置为True,然后编写如下事件过程:
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim ch As String
ch=Chr(KeyAscii)
KeyAscii=Ase(UCase(ch))
Print Chr(KeyAscii+2)
End Sub
程序运行后,按键盘上的“A”键,则在窗体上显示的内容是( )
A. A
B. B
C. C
D. D
[单项选择]把窗体的KeyPreview属性设置为True,然后编写如下事件过程
Private Sub Form_KeyPress(KeyAseii As Integer)
Dim ch As String
ch=Chr(KeyAscii)
KeyAscii=Ase(UCase(ch))
Print Chr(KcyAseii+2)
End Sub
程序运行后,按键盘上的“A”键,则在窗体上显示的内容是
A. A
B. C
C. D
[单项选择]把窗体的KeyPreview属性设置为True,然后编写如下过程:
Private SubForm_KeyDown(KeyCode As Integer,Shift As Integer)
PrintChr (KeyCode)
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
PrintChr(KeyCode+2)
End Sub
程序运行后,如果按“A”键,则输出结果为 ______。
A. A
B. A
C. A
D. A
[填空题]把窗体的KeyPreview属性设置为True,并编写如下两个事件过程:
Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer)
Print KeyCode;
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Print KeyAscii
End Sub
程序运行后,如果按下A键,则在窗体上输出的数值为 【11】 和 【12】 。