单选题在窗体上画一个名称为 Text1的文本框和一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) Dim iAsInteger, n As Integer For i = 0 To 50 i = i + 3 n = n + 1 If i > 10 Then Exit For Next Text1.Text = Str(n) End Sub 程序运行后,单击命令按钮,在文本框中显示的值是________。
单选题以下正确的叙述是 ______。 Select Case x Case 1 to 10 …… End Select
单选题单击命令按钮时,下列程序代码的执行结果为______。 Private Function FirProc (x As Integer,y As Integer,z As Integer) FirProc=2*x+y+3*z End Function Private Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End Function Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim C As Integer a=2 b = 3 c = 4 Print SecProc(c,b,
单选题在程序运行期间可以将图形装入窗体、图片框或图像框的函数是( )。
单选题在窗体上画一个名称为CommonDialog1的通用对话框,一个名称为Command1的命令按钮。然后编写如下事件过程:
Private Sub Command1_Click( )
CommonDialogl.FileName=“”
CommonDialogl,Filter=“All File|*.*|(*.Doc)|*.Doc|(*.Txt)|*.Txt”
CommonDialogl.Filterlndex=2
CommonDialogl.DialogTitle=“VBTest”
CommonDialogl.Action=1
End Sub 对于这个程序,以下叙述中错误的是( )。
单选题在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Static y As Integer Cls For i=0 To 2 x=x+y y=y+3 Next Print x, y End Sub 程序运行后,连续二次单击Command1按钮后,窗体上显示的是 ______。
单选题如果在C盘当前文件夹下已存在名称为studata.dat的顺序文件,那么执行语句Open "C:/studata.dat" For Append As#1之后,将
单选题执行以下语句后显示结果为 ______。 Dim x As Integer If x Then Print x Else Print x-1
单选题在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) a$=“VisualBasic” Print String(3,a$) End Sub程序运行后,单击命令按钮,在窗体上显示的内容是
单选题表达式Int(8*Sqr(36)*10^(-2)*10+0.5)/10的值是( )。 A) 0.48 B) 0.048 C) 0.5 D) 0.05
单选题要使定时器控件可以使用,需设置的属性是__________。
单选题在窗体上先后画两个图片框,名称分别为Picture1和banana,banana中添加了香蕉图片(见图1),且将banana.DragMode属性设置为1。要求程序运行时,可以用鼠标把banana拖曳到Picttne1中(见图2)。能实现此功能的事件过程是______。
单选题在窗体上画一个命令按钮,名称为Command1。程序运行后,如果单击命令按钮,则显示一个输入对话框,在该对话框中输入一个整数,并用这个整数作为实参调用函数过程F1。在F1中判断所输入的整数是否是奇数,如果是奇数,过程F1返回1,否则返回0。能够正确实现上述功能的代码是( )。
单选题在窗体上画—个命令按钮和—个标签,其名称分别为Command1和Label1,然后编写如下事件过程: Private Sub Command1_tlick() Counter=0 For i=1 To 4 For j=6 To 1 Step-2 Counter=Counter+1 Next j Next i Label1.Caption=Str(Counter) End Sub 程序运行后,单击命令按钮,标签中显示的内容是______。
单选题在窗体上画一个通用对话框,其名称为CommonDialogl,然后画一个命令按钮,并编写如 下事件过程: Private Sub Commandl_Click() CommonDialogl,Flags=vbOFNHideReadOnly CommontDialogl.Filter="All Files(*.*)|*.*|Text Files (*.*)|*.txt|"_ & Batch Files (*.bat) |*.bat" CommonDialogl.Filterlndex=1 CommonDialogl.Showopen MsgBox CommonDialogl.FileName End Sub 程序运行后,单击命令按钮,将显示一个“打开”对话框,此时在“文件类型”框中显示的是
单选题下列说法错误的是
A. 标准模块的扩展名是.bas
B. 标准模块由程序代码组成
C. 标准模块只用来定义一些通用的过程
D. 标准模块不附属于任何一个窗体
单选题下列对于软件测试的描述中正确的是
单选题在窗体上画一个命令按钮,然后编写如下时间过程( )。 Print Sub Command1_Click() a=InputBox("Enter the First interger") b=InputBox("Enter the Second interger") Print b+a End Sub 程序运行后,单击命令按钮,先后在两个输入对话框中分别输入456和123,则输出结果是
单选题茌窗体上画一个名称为List1的列表框,一个名称为Label1的标签。列表框中显示若干城市的名称。当单击列表框中的某个城市名时,在标签中显示选中城市的名称。下列能正确实现上述功能的程序是( )。 A) Private Sub List1_Click() Label1.Caption=List1.ListIndex End Sub B) Private Sub List1_Click() Label1.Name:List1=ListIndex End Sub C) Private Sub List1_Click() Label1.Name=List1.Text End Sub D) Private Sub List1_Click() Laloel1.Caption=List1.Text End Sub
单选题下列操作中不能向工程中添加窗体的是( )。
