单击命令按钮时,下列程度段的执行结果为( )。 Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a=2:b=4:c=6 Call S1(a,B) Print "a="; a; "b="; b; "c="; c Call S2(a,B) Print "a ="; a; "b ="; b; "c="; c; End Sub Private Sub S1(x As Integer, y As Integer) Dim c As Integer x=2*x:y=y+2:c=x+y End Sub Sub S2(x As Integer, ByVal y As Integer) Dim e As Integer x=2*x:y=y+2:c=x+y End Sub
A.a=4 b=6 e=6 a=4 b=6 e=6
B.a=8 b=6 c=6 a=8 b=6 c=6
C.a=4 b=6 e=6 a=8 b=6 e=6
D.a=8 b=6 c=6 a=4 b=6 c=6
第1题:
若看到程序中确以下事件过程,则可以肯定的是,当程序运行时( )。 Private Sub Click—MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Print"VB Program" End Sub
A.用鼠标左键单击名称为“Command1”的命令按钮时,执行此过程
B.用鼠标左键单击名称为“MouseDown”的命令按钮时,执行此过程
C.用鼠标右键单击名称为“MouseDown”的命令按钮时,执行此过程
D.用鼠标左键或右键单击名称为“Click”的命令按钮时,执行此过程
第2题:
若看到程序中确以下事件过程,则可以肯定的是,当程序运行时( )。
Private Sub Click—MouseDown(Button As Integer,Shift As Integer,X As Single,Y
As Single)
Print"VB Program"
End Sub
A.用鼠标左键单击名称为“Command1”的命令按钮时,执行此过程
B.用鼠标左键单击名称为“MouseDown”的命令按钮时,执行此过程
C.用鼠标右键单击名称为“MouseDown”的命令按钮时,执行此过程
D.用鼠标左键或右键单击名称为“Click”的命令按钮时,执行此过程
第3题:
应用程序窗体的名称属性为Frm1,窗体上有一个命令按钮,其名称属性为Cmd1,单击窗体和命令按钮的事件过程名分别为______。
A.form_ Click() Command1_Click()
B.Frm1_ Click() Command1_ Click()
C.form_ Click() Cmd1_ Click()
D.Frm1_ Click() Cmd1_ Click()
第4题:
设置命令按钮的()属性为True,可使按Enter键时,执行该按钮的单击事件过程。
A.Cancel
B.Enabled
C.Value
D.Default
第5题:
单击命令按钮时,下列程序段的执行结果为( )。 Private Sub Command1_Click() Dim FirstStr As String FirstStr="abcdef" Print PickMid(FirstStr) End Sub Private Function PickMid(xStr As String)As String Dim tempStr As String,strLen As Integer TempStr=" " strLen=Len(xStr) i=1 Do While i<=strLen/2 tempStr=tempStr+Mid(xStr,i,1)+Mid(xStr,strLen-i+1,1) i=i+1 Loop PickMid=tempStr End Funcfion
A.abcdef
B.fed
C.fedcba
D.defabc
第6题:
如果要在单击命令按钮时执行一段代码,则应将这段代码写在______事件过程中。
第7题:
单击命令按钮时,下列程序段的执行结果为( )。 Public Sub Procl(n As Integer,ByVal m As Integer) n=n Mod 10 m=m\10 End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer x=12;y=34 Call Procl(x,y) Print x;y End Sub
A.12 34
B.2 34
C.2 3
D.12 3
第8题:
单击命令按钮时,下列程序段的执行结果为( )。
A.8
B.6
C.4
D.2
第9题:
单击命令按钮,下列程序段的输出结果为______。 Private Sub Command1_Click() Dim n As Integer n = 5 While n <= 10 n = n + 2 Print n; Wend End Sub
A.5 7 9 11
B.6 8 10
C.7 9 11
D.6 8 10 12
第10题:
下列关于图层设置的说法正确是()。
A.可以选择“格式”-“图层”命令来执行
B.可以单击“视图”选项卡-“选项板”面板中的“图层特性”命令按钮来执行
C.可以单击“默认”选项卡-“选项板”面板中的“图层特性”命令按钮来执行
D.可以单击“图层”工具栏中“图层特性”命令按钮来执行