更多"假定有如下的命令按扭(名称为 Command1)事件过程: Priva"的相关试题:
[单项选择]在窗体上添加一个名称为Command1的命令按钮,然后编写如下事件代码: Private Sub Command1_Click( ) Dim a(10,10) For m=2 To 4 For n=4 TO 5 a(m,n)m*n Next n Next m MsgBox a(2,4)+a(3,5)+a(4,5) End Sub 打开窗体运行后,单击命令按钮,则消息框的输出结果是( )。
A. 23
B. 33
C. 43
D. 53
[单项选择]在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
x = -5
If Sgn(x) Then
y = Sgn(x ^ 2)
Else
y = Sgn(x)
End If
Print y
End Sub
程序运行后,单击命令按钮,窗体上显示的是( )。
A. -5
B. 25
C. 1
D. -1
[单项选择]在窗体上添加一个名称为Command1的命令按钮,然后编写如下事件代码:
private Sub Command1 Click( )
Dima(10,10)
Form=2 To 4
Forrn=4 To 5
a(m,n)=m*n
Next n
Next m
MsgBoxa(2,4)+a(3,5)+a(4,5)
End Sub
打开窗体运行后,单击命令按钮,则消息框的输出结果是( )。
A. 23
B. 33
C. 43
D. 53
[单项选择]在窗体上绘制一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) c="ABCD" For n=1 To 4 Print______ Next End Sub 程序运行后,单击命令按钮,要求在窗体上显示如下内容: D CD BCD ABCD 则在横线处应填入的内容为( )。
A. Left(c,n)
B. Right(c,n)
C. Mid(c,n,1)
D. Mid(c,n,n)
[单项选择]在窗体上面一个名称为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. 死循环
[单项选择]在窗体画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) c=1234 c1=Trim(Str(c)) For i=1 To 4 Print Next End Sub 程序运行后,单击命令按钮,要求在窗体上显示如下内容: 1 12 123 1234 则在下划线处应填入的内容为______。
A. Rght(c1,
B. Left(c1,
C. Mid(c1, i, 1)
D. Mid(c1, i,
[单项选择]在窗体中添加一个名称为Command1的命令按钮,然后编写如下事件代码: Private Sub Command1_Click( ) A=75 If A>60 Then I=1 If A>70 Then 1=2 If A>80 Then 1=3 If A>90 Then 1=4 MsgBox I End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果是( )。
A. 1
B. 2
C. 3
D. 4