当Form_Click事件发生时,程序输出的结果是 ______。 Private Sub Form. Click() Dim a As Integer,b As Integer,c As Integer a=1: b=1 Print a; b Do c=a+b Print c a=b:b=c Loop Until c>=5 End Sub
A.1 1 1
B.2 3 5
C.2 5 7
D.2 3 4
第1题:
程序段如下:Private Sub Command1_ Click() a = 0 for 1=15 To 15 Step- 2 a = a +1 Next I Print a, IEnd Sub发生Command 1的单击事件后,程序的输出结果是 ______。
A.0 13
B.15 13
C.0 15
D.15 15
第2题:
当Form1_Click事件发生时,程序的输出结果是( )。 Private Sub Form_Click() Dim M As Integer,k As Integer,t As Integer M=5:k=7 Select Case M Case Is<0 M=M+5 Case 1 To 10 t=M:M=k:k=t Case Else M=k Mod 3 End Select Print M,k,t End Sub
A.5 5 7
B.5 7 5
C.7 5 5
D.7 5 7
第3题:
(25)若窗体Frm1中有一个命令按钮Cmd1,则窗体和命令按钮的Click事件过程名分别为
A)Form_Click() Command1_Click()
B)Frm1_Click() Command1_Click()
C)Form_Click() Cmd1_Click()
D) Frm1_Click() Cmd1_Click()
第4题:
当发生Form_Click事件时,下列程序的输出结果是( )。 Private m As Integer,n As Integer Private Sub Form_Click() Dim k As Integer,p As Integer k=6:p=60 Call sub1(k,p) Print m,n,m,k,p Call sub1(k,p) Print m,n,k,p End Sub Private Sub Form_Load() m=7 n=70 End Sub Public Sub sub1(x As Integer,ByVal y As Integer) Dim m As Integer n=n+5 m=n+x+y x=x+y y=x+y End Sub
A.7 75 66 60 7 80 126 60
B.7 75 66 60 7 75 126 60
C.7 75 66 60 7 80 66 60
D.7 75 66 60 7 75 66 60
第5题:
程序段如下,当发生Form_Click事件时,窗体上输出的结果是( )。 Option Explicit Private x As Integer Public y As Integer Sub Test() Dim y as integer x=2:y=2 Print"x1=";x;"y1=";y End Sub Private Sub Form_Click() x=1:y=1 Test Print "X2=";x;"y2=";y End Sub
A.x1=2 y1=2 x2=2 y2=1
B.x1=2 y1=2 x2=2 y2=2
C.x1=2 y1=1 x2=2 y2=2
D.x1=2 y1=1 x2=2 y2=1