更多"编写如下事件过程: Private Sub Form Activat"的相关试题:
[单项选择]程序如下:
Private Sub form_ Activate( )
Dim a As Integer
for i=4 To 5
a=fun(i)
Print a,
Next i
End Sub
Private Function fun(n)As Integer
if n >0 then
fun =n* fun(n-1)
Else
fun=1
End if
End Function
程序最后打印结果是______。
A. 4 5
B. 12 120
C. 24 120
D. 24 60
[单项选择]编写如下事件过程:
Private Sub Form_Activate( )
Dimscore(1 to 3)As Integer
Dimi As Integer
Dim t As Variant
Fori= 3 To 1 Step-1
score(i)=2*i
Nexti
ForEach t Inscore
Printt
Next
End Sub
程序运行后窗体上显示的值是( )。
A. 642
B. 246
C. 2
D. 6
[填空题]编写如下代码:
Dim Flag As Boolean
Private Sub Form MouseDown (Button As Integer,
Shift As Integer, X As Single, Y As Single)
Flag = True
End Sub
Private Sub Form MouseMove (Button As Integer,
Shift As Integer, X As Single, Y As Single)
Flag = False
End Sub
Private Sub Form_ MouseUp (Button As Integer,
Shift As Integer, X As Single, Y As Single)
If Flag = False Then
Print "DDDD"
End If
End Sub
程序运行后,如果想在窗体上输出DDDD,则应执行的操作为______ 。
[填空题]有以下程序:
Private Sub Form_Activate( )
For j=1 to 3
x=3
For i=l to 2
x=x+6
Next
Next
Print x
End Sub
程序运行后,窗体上显示的结果为______。
[填空题]有以下程序:
Private Sub Form_Activate( )
For j=1 to 3
x=3
For i=1 to 2
x=x+6
Next
Next
Print x
End Sub
程序运行后,窗体上显示的结果为______。
[填空题]有以下程序:
Private Sub Form_Activate( )
Fori=1 to 3
x=3
For i=i to 2
x=x+6
Next
Next
Print X
End Sub
程序运行后,窗体上显示的结果为______
[填空题]有以下程序:
Private Sub Form_Activate( )
For j=1 to 3
x=3
For i=1 to 2
x=x+6
Next
Next
Print x
End Sub
程序运行后,窗体上显示的结果为______。
[填空题]Private Sub Form_Activate( )
For i=1 To 3
x=3
For I=1 To 2
x=x+6
Next I
Next j
Print X
End Sub
程序运行后,窗体上显示的结果为 (6)
[填空题]有如下事件过程:
Private Sub Form_Active( )
Dim Score(1 to 3) As Integer
Dim i As Integer
Dim t As Variant
For i=3 To 1 step-1
Score (i)=2*i
Next
For Each t In Score
Print t
Next
End Sub
程序运行后窗体上显示的值为______。
[填空题]有如下事件过程:
Private Sub Form_Active( )
Dim Score(1 to 3) As Integer
Dim i As Integer
Dim t As Variant
For i=3 To 1 step-1
Score (i)=2*i
Next
For Each t In Score
Print t
Next
End Sub
程序运行后窗体上显示的值为______。
[填空题]有如下事件过程:
Private Sub Form Active ( )
Dim Score (1 to 3) As Integer
Dim i As Integer
Dim t As Variant
Fori=3 To 1 step-1
Score (i) = 2 * i
Next
For Each t In Score
Print t
Next
End Sub
程序运行后窗体上显示的值为 【14】 。
[填空题]设有如下程序
Private Sub Form Click( )
Dim a As Integer, b As Integer
a=20: b=50
p1 a, b
p2 a, b
p3 a, b
Print "a="; a, "b="; b
End Sub
Sub p1(x As Integer, ByVal y As Integer)
x = x+10
y = Y+20
End Sub
Sub p2(ByVal x As Integer, y As Integer)
x = x+10
y = y+20
End Sub
Sub p3(ByVal x As Integer, ByVal y As Integer)
x = x+10
y = y+20
End Sub
该程序运行后,单击窗体,则在窗体上显示的内容是:a==______和b=______。
[单项选择]有如下程序:
Private Sub Form Click( )
Dim Check,Counter
Check=True
Counter=0
Do
Do While Counter<20
Counter=Counter+1
If Counter=10 Then
Check=False
Exit Do
End If
Loop
Loop Until Check=False
Print Counter,Check
End Sub
程序运行后,单击窗体,输出结果为
A. 15 0
B. 20 -1
C. 10 Tree
D. 10 False