单项选择题
设一个工程由两个窗体组成,其名称分别为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,100,-100) f.Show f.Caption=y End Sub 运行以上程序,正确的结果是
A.Form1的Caption属性值为100
B.Form2的Caption属性值为-100
C.Form1的Caption属性值为-100
D.Form2的Caption属性值为100
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1_Click( ) Dim a As Variant a=Array(1,2,3,4,5) Sum=0 For i=1 TO 5 Sum=Sum+a(i) Next i x=Sum 5 For i=1 To 5 If a(i)>xThen Print a(i) Next i End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是
A.1 2
B.1 2 3
C.3 4 5
D.4 5
点击查看答案&解析
单项选择题
阅读程序: Option Base 1 Private Sub Form_Click( ) Dim arr Sum Sum=0 arr=Array(1,3,5,7,9,11,13,15,17,19) For i=1 TO 10 If arr(i) 3=arr(i) 3 Then Sum=Sum+art(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为
A.13
B.14
C.27
D.15
点击查看答案&解析
相关试题
在窗体上画两个名称分别为Command1和Comma...
在窗体上画一个名称为“Command1”、标题...
阅读程序:Option Base 1Private Sub ...
本程序的功能是利用随机数函数模拟投币,方...
在关系模型中,把数据看成一个二维表,每一...