7、阅读下面的程序段:
For I = 1 To 3
For j = 1 To I
For k = j To 3
A=A+1
Next k
Next j
Next I
执行上面的三重循环后,a的值为__________。
A)3 B)9 C)14 D)21
8、在窗体上画两个文本框(其Name属性分别为Text1和Text2)和一个命令按钮(其Name属性为Command1),然后编写如下的事件过程:
Private Sub Command1_Click()
X = 0
Do While x<50
X = ( x + 2 ) * ( x + 3 )
N = n+1
Loop
Text1.Text = Str(n)
Text2.Text = Str(x)
End Sub
程序执行后,单击命令按钮,在两个文本框中显示的值分别为__________。
A)1和0 B)2和72 C)3和50 D)4和168
9、假定窗体上有一个标签,名为Lable1。为了使该标签透明并且没有边框,则正确的属性设置为__________。
A) Lable1.BackStyle = 0
Lable1.BorderStyle = 0
B) Lable1.BackStyle = 1
Lable1.BorderStyle = 1
C) Lable1.BackStyle = true
Lable1.BorderStyle = true
D) Lable1.BackStyle = Flase
Lable1.BorderStyle = False
10、对窗体编写如下代码:
Option Base 1
Private Sub Form_KeyPress (KeyAscii As Integet)
A = Array (237,126,87,48,498)
M1 = a (1)
M2 = 1
If KeyAscii = 13 Then
For I = 2 To 5
If a (i)>m1 then
M1 = a(i)
M2 = I
End if
Next I
End if
Print m1
Print m2
End Sub
程序执行后,按回车键,输出结果为
A)48 B)237 C)498 D)498