更多"在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: "的相关试题:
[单项选择]在窗体上画一个命令按钮(名称为Command1),并编写下列代码:
Function Fun1(ByVa1 a As Integer,b As Integer)As Integer
Dim t As Integer
t=a-b
b=t+a
Fun1=t+b
End Function
Private Sub Command1Click( )
Dim X As Integer
x=10
Print Fun1(Vun1(X,(Fun1(x,x-1))),x-1)
End Sub
程序运行后,单击命令按钮,输出结果是( )。
A. 10
B. 0
C. 11
D. 21
[单项选择]在窗体上画一个命令按钮(名称为Command1),并编写如下代码:
Function Fun1 (ByVal a As Integer, b As Integer) As Integer
Dim t As Integer
t=a-b
b=t+a
Fun1=t+b
End Function
Private Sub Command1_Click( )
Dim x As Integer
x=10
Print Fun1 (Fun1 (x, (Fun1 (x, x-1))), x-1)
End Sub
程序运行后,单击命令按钮,输出结果是( )。
A. 10
B. 0
C. 11
D. 21
[单项选择]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(ByVal x As Integer,y As Integer) y=x*y If y>0 Then Func=x Else Func=y End If End Function Private Sub Command1_Click( ) Dim a As Integer,b As Integer a=3 b=4 c=Func(a,B) Print "a=";a Print=b=";b Print"c=";c End Sub 程序运行后,单击命令按钮,其输出结果为 ______。
A. a=3 b=12 c=3
B. a=3 b=4 c=3
C. a=3 b=4 c=12
D. a=13 b=12 c=12
[单项选择]在窗体上画一个命令按钮(名称为Command1),并编写如下代码:
Function Fun1(ByVal a As Integer, b As Integer) As Integer
Dim t As Integer
t=a-b:b=t+a:Fun1=t+b
End Function
Private Sub Command1_Click( )
Dim x As Integer
x=10
Print Fun1(Fun1(x, (Funl(x,x-1))),x-1)
End Sub
程序运行后,单击命令按钮,输出结果是
A. 10
B. 0
C. 11
D. 21
[单项选择]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序:
Function Func(ByVal x As Integer, y As Integer)
y=x*y
If y >0 Then
Func = x
Else
Func = y
End If
End Function
Private Sub Command1_ Click( )
Dim a As Integer, b As Integer
a=3
b=4
c = Func(a, B )
Print "a="; a
Print "b="; b
Print "c="; c
End Sub
程序运行后,单击命令按钮,其输出结果为______。
A. a=3 b=12 c=3
B. a=3 b=4 c=3
C. a=3 b=4 c=12
D. a=13 b=12 c=12
[填空题]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序;
Function M(x As Integer,y As Integer)
M=IIf(x>y,x,y)
End Function
Private Sub Commandl_Click( )
Dim a As Integer,b As Integer
a=100
b=200
PrintM(a,B)
End Sub
程序运行后,单击命令按钮,输出结果为 【15】 。
[填空题]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序;
Function M(x As Integer,y As Integer)
M=IIf(x>y,x,y)
End Function
Private Sub Commandl_Click( )
Dim a As Integer,b As Integer
a=100
b=200
PrintM(a,B)
End Sub
程序运行后,单击命令按钮,输出结果为 【15】 。
[单项选择]在窗体上画一个命令按钮,名称为Command1。单击命令按钮时,执行如下事件过程:
Private Sub Command1_Click( )
a$="software and hardware"
b$=Right(a$,8)
c$=Mid(a$,1,8)
MsgBox a$,,b$,c$,1
End Sub
则在弹出的信息框的标题栏中显示的信息是( )。
A. software and hardware
B. software
C. hardware
D. 1
[单项选择]在窗体上画一个命令按钮,名称为Comraandl。单击该命令按钮时,执行如下事件过程:
Private Sub Command1_Click( )
a$="software and hardware"
b$=Right(a$, 8)
c$=Mid(a$, 1, 8)+b$
MsgSox a$, 1, b$
End Sub
则在弹出的消息框的标题栏中显示的信息是______。
A. software and hardware
B. software
C. hardware
D. 1