题目内容:
窗体上有两个名称分别为Text1、Text2的文本框。Text1的KeyDown事件过程如下:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Dim s As String
s=Chr(KeyCode+35)
Text2.Text=s
End Sub
当向文本框Text1中输入小写字母a时,文本框Text2中显示的是
A.A
B.a
C.D
D.d
参考答案:
答案解析:
窗体上有两个名称分别为Text1、Text2的文本框。Text1的KeyDown事件过程如下:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Dim s As String
s=Chr(KeyCode+35)
Text2.Text=s
End Sub
当向文本框Text1中输入小写字母a时,文本框Text2中显示的是
A.A
B.a
C.D
D.d