单项选择题

在窗体上面有一个文本框,其名称为Text1,编写如下事件过程:
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim str As String
str=Chr(KeyAscii)
KeyAscii=Asc(UCase(str))
Text1.Text=String(2,KeyAscii)
End Sub
程序运行后,如果在键盘上输入字母“a”,则在文本框Text3中显示的内容为( )。

A.aaa
B.AAA
C.AA
D.aa
<上一题 目录 下一题>
热门 试题

单项选择题
在窗体上画一个名为Command1的命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1_Click() Dim Arr Arr=Array(1,2,3,4,5) j = 1 For i=5 To 1 Step-1 S=S+Arr(i)*j j=j*10 Next Print S End Sub 程序运行后,单击命令按钮,输出结果为( )。
A.54321
B.123
C.12345
D.345
单项选择题
单击命令按钮时,下列程度段的执行结果为( )。 Pfivate Sub Command1_Click() Dima As Integer,b As Integer, c As Integer a=2:b=4:c=6 Call S1(a,b) Print a= ;a; b= ;b; c= ;c Call S2(a,b) Print a= ;a; b= ;b; c= ;c; End Sub Private Sub S1(x As Integer, y As Integer) Dim c As Integer x=2*x:y=y+2:c=x+y End Sub Sub S2(x As Integer, By Val y As Integer) Dim e As Integer x=2*x:y=y+2:e=x+y End Sub
A.a=4 b=6 c=6
a=4 b=6 c=6
B.a=8 b=6 c=6
a=8 b=6 c=6
C.a=4 b=6 c=6
a=8 b=6 c=6
D.a=8 b=6 c=6
a=4 b=6 c=6
相关试题
  • 语句Dim Arr(3 To 5,-2 To 2)...
  • 最简单的交换排序方法是( )。
  • 在用Open语句打开文件时,如果省略“For方...
  • 某人在窗体上画了一个名称为Timer1的计时...
  • 下列每组控件中,都包含有滚动条的一组控件...