单选题
VB
题号 #453439
在窗体上有两个文本框:Text1和Text2,然后编写如下事件过程:
Private Sub Form_Load()
Show Text1.Text="":Text2.Text="":Text2.SetFocus
End Sub
Private Sub Text2_KeyDown(KeyCode As IntegeL Shift As Integer)
Text1.Text=Text1.Text+Chr(KeyCode-4)
End Sub
程序运行后,如果在Text2文本框中输入“ertyu”,则Text1文本框中的内容为( )。
参考答案
B
答案解析
KeyDown事件返回键盘上的键,如按下字母“A”或者字母键“a”,则KeyCode码相同,都是65,所以转换成的字母都是大写的。
你可能感兴趣的试题
A.2 4
B.2 4
C.10 10
D.4 4
2 4 4 8 58 58 8 9
2 4 4 8 58 58 8 9
A.Command1.Move-200
B.Command1.Move-200
C.Command1.Left=Command1.Left+200
D.Command1.Left=Command1.Left-200