单选题在窗体上画一个命令按钮和一个文本框,其名称分别为Command1和Text1,把文本框的Text属性设置为空白,然后编写如下事件过程:
Private Sub Command1_Click()
a=InputBox("Enter an integer")
b=Text1. Text
Text1. Text=b+a
End Sub
程序运行后,在文本框中输入456,然后单击命令按钮,在输入对话框中输入123,则文本框中显示的内容是______。
单选题假定有如下事件过程: Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button=2 Then PopupMenu popForm End If End Sub 则以下描述中错误的是( )。
单选题下列程序段错误的是()。
单选题窗体上有一个列表框和一个文本框,编写下列两个事件过程: Private Sub Form Load() List1.Addltem"北京" List1.Addltem"天津" List1.Addltem"上海" Text1.Text="" End Sub Private Sub List1 Click() Print Text1.Text+List1.Text End Sub 程序运行后,在文本框中输入“中国”,然后单击列表框中的“北京”,则输出结果是( )。
单选题用于获得字符串S最左边4个字符的函数是( )。 A) Left(S,4) B) Left(1,4) C) Leftstr(S) D) Leftstr(3,4)
单选题下列叙述中正确的是( )。
单选题激活菜单栏的快捷键是( )。
单选题有如下程序: Private Sub Form_Click() Dim i As Integer,Sum As Integer Sum=0 For i=2 To 10 If i Mod 2<>0 And i Mod 3=0 Then Sum=Sum+i End If Next Print Sum End Sub 程序运行后,单击窗体,输出结果为
单选题在窗体上画1个名称为Command1的命令按钮,然后编写如下事件过程:
Option Base 1
Private Sub Command1_Click()
Dim a(5, 5)As Integer
For i=1 To 5
For j=1 To 5
a(i,j)=(i+j)*5/10
Next j
Next i
s=0
For i=1 To 5
S=s+a(i,i)
Next i
Print s
End Sub
程序运行后,单击命令按钮,输出结果是______。
单选题Print #语句的作用是( )。
单选题如果要在窗体上画一个标签,应在工具箱窗口中选择的图标是______。A.B.C.D.
单选题代数式x1-|a|+In10+sin(x2+2π)/cos57°对应的Visual Basic表达式是( )。
单选题在窗体上添加一个命令按钮,名为Command1,其单击事件中有下列程序段,则事件过程执行后,文本框中输出( )。 For i==1 To 4 For j=1 To 3 x=3 For k=1 To 2 x=x+3 Next k Next j Next i Text1. Text=Str(x)
单选题假定有下列程序段
For i=1 TO 3
For j=5 TO 1 Step-1
Print i*j
Next j
Next i
则语句Print i*j的执行次数是( )。
单选题单击一次命令按钮之后,下列程序代码的执行结果为______ 。 Private Sub Command1_ Click() a = fun(4) + fun(5) Print a; End Sub Public Function fun (n As Integer) Static Num For i = 1 To n Num = Num + i Next i fun = Num End Function
单选题在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command1_Click()
x=InputBox("Enter the First integer")
y=InputBox("Enter the Second integer")
Print y+x
End Sub
程序运行后,单击命令按钮,先后在两个输入对话框中分别输入456和123,则输出结果是______。
单选题有如下程序,运行时从键盘输入3,输出结果是 ______。 Private Sub Command1_Click() a=InputBox("请输入一个数字:") Select Case a Case Is>2 b=a+1 Case Is>3 b=a+2 Case Is>4 b=a+3 Case Is>5 b=a+4 End Select Print a + b End Sub
单选题在设计阶段,属性窗口的内容是______。
单选题有如下程序: Option Base 1 Private Sub Form_Click() Dim arr, Sum Sum=0 arr=Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19) For i=1 To 10 If arE(i)/3=arr(i)/3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。
单选题以下叙述中错误的是