更多"单击命令按钮,下列事件过程的执行结果为( )。
Priv"的相关试题:
[单项选择]单击命令按钮,下列事件过程的执行结果为( )。
Private Sub Command1_Click( )
Dim x As Integer, y As Integer
x=40:y=72
Call PtoP(x, y)
Print x; y
End Sub
Public Sub PtoP(Byval n AS Integer, ByVal m Aa Integer)
n = n / 10+2
m = m / 10+2
End Sub
A. 0 8
B. 40 72
C. 4 50
D. 78 50
[单项选择]命令按钮Command1的单击事件过程如下:
Private Sub Command1_Click( )
Dim a( 10, 10)As Integer
x=0
For i = 1 To 3
For j = 1 To 3
a(i, j) =i * 2 Mod j
If x<a(i, j)Then x=a(i, j)
Next
Next
Print x
End Sub
执行上述事件过程后,窗体上显示的是( )。
A. 1
B. 2
C. 3
D. 4
[单项选择]单击命令按钮,下列事件过程的执行结果为 Private Sub Command1_Click( ) Dim x As Integer, y As Integer x=40:y=72 Call PtoP(x, y) Print x; y End Sub Public Sub PtoP(Byval n AS Integer, ByVal m Aa Integer) n = n / 10+2 m = m / 10+2 End Sub
A. 0 8
B. 40 72
C. 4 50
D. 78 50
[填空题]设有命令按钮Command1的单击事件过程,代码如下:
Private Sub Command1_Click( )
Dim a(3,3)As Integer
For i=1 To 3
For j=1 To 3
a(i,j)=i*j+i+j
Next j
Next i
Sum=0
For i=1 To 3
Sum=Sum+a(i,4-i)
Next i
MsgBox Sum
End Sub
运行程序,单击命令按钮,消息框输出结果是______。
[填空题]设有命令按钮Command 1的单击事件过程,代码如下:
Private Sub Command1_Click( )
Dima(3,3)As Integer
For i=1 To 3
For j=1 To 3
a(i,j)=i*j+i+j
Next j
Next i
Sum=0
For i=1 To 3
Sum=Sum+a(i,4-i)
Next i
MsgBox Sum
End Sub
运行程序,单击命令按钮,消息框输出结果是______。
[填空题]窗体上有名称为Command1的命令按钮。事件过程及两个函数过程如下:
Private Sub Command1_Click( )
Dim x As Integer, y As Integer, z
x=3:y=5:z=fy(y)
Print fx(fx(x)),y
End Sub
Function fx(ByVal a As Integer)
a=a+a:fx=a
End Function
Function fy(ByRef a As Integer)
a=a+a:fy=a
End Function
运行程序,并单击命令按钮,则窗体上显示的两个值依次是 (12) 和 (13) 。
[单项选择]在窗体上画一个命令按钮,名称为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
[单项选择]单击窗体上Command1命令按钮时,执行如下事件过程: Private Sub Command1_Click( ) a$= "software and hardware" b$= Right(a$, 8) c$= Mtd(b$ 1, 8) Msgbox c$ End sub则在弹出的信息框的标题栏中显示的信息是( )。
A. software and hardware
B. software
C. hardware
D. and
[填空题]设有命令按钮Command1的单击事件过程,代码如下,请填空。
Private Sub Command1_Click( )
Dim a(30)As Integer
For i=1 To 30
a(i)=i
Next
For Each arrItem ______ a
If arrItem Mod 7=0 Then Print arrItem;
If arritem>90 Then Exit For
Next
End Sub
[填空题]设有命令按钮Command1的单击事件过程,代码如下,请填空。
Private Sub Command1_Click( )
Dim a(30) As Integer
For i=1 To 30
a(i) =i
Next
For Each arrItem______a
If arrItem Mod 7=0 Then Print arrItem;
If arrItem>90 Then Exit For
Next
End Sub