单项选择题

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:
Private Sub Command1_Click()
Dim a As Integer, s As Integer
a=8
s=1
Do
s=s+a
a=a-1
Loop While a<=0
Print s;a
End Sub
程序运行后,单击命令按钮,则窗体上显示的内容是( )。

A.7 9
B.34 0
C.9 7
D.死循环
<上一题 目录 下一题>
热门 试题

单项选择题
单击按钮时,以下程序运行后的输出结果是( )。 Private Sub procl(X As Integer, y As Integer, z As Integer) X=3*z y=2*Z z=x+y End Sub Private Sub Command1_Click() Dim x As Integer, y As Integer, z As Integer x=1:y=2:z=3 Call procl(x, x, z) Print x; x; z Call procl(x, y, y) Print x; y; y End Sub
A.6 6 12
6 10 10
B.9 5 10
5 10 10
C.9 6 12
9 10 15
D.9 10 10
5 4 10
单项选择题
设一个工程由两个窗体组成,其名称分别为Form1和Form2,在Form1上有一个名称为Command1的命令按钮。窗体Form1的程序代码如下: Private Sub Command1_Click() Dim a As Integer a=10 Call g(Form2,a) End Sub Private Sub g(f As Form, X As Integer) y=IIf(x>,10,000, -100) f. Show f. Caption=y End Sub 运行以上程序,正确的结果是( )。
A.Forml的Caption属性值为100
B.Form2的Caption属性值为-100
C.Form1的Caption属性值为-100
D.Form2的Caption属性值为100
相关试题
  • 在窗体上画一个命令按钮和一个文本框,其名...
  • 下面的程序用冒泡法将数组a中的10个整数...
  • 新建一个工程,内有两个窗体,窗体Form1上...
  • 为了改变计时器控件的时间间隔,应该修改该...
  • 在一个容量为25的循环队列中,若头指针fr...