单选题满足下列条件之一的年份是闰年:1)年份能被4整除但不能被100整除2)年份能被400整除若y代表年份,下面判断闰年的正确表达式是( )。
单选题设有如下通用过程:
Public Function Fun(xStr As String) As String
Dim tStr As String,strL As Integer
tStr=" "
strL=Len(xStr)
i=1
Do While i<=strL/2
tStr=tStr & Mid(xStr,i,1) & Mid(xStr,strL-i+1,1)
i=i+1
Loop
Fun=tStr
End Function
在窗体上画一个名称为Command1的命令按钮。然后编写如下的事件过程:
Private Sub Command1_Click()
Dim S1 As String
S1="abcdef"
Print UCase(Fun(S1))
End Sub
程序运行后,单击命令按钮,输出结果是
单选题要求当鼠标在图片框P1中移动时,立即在图片框中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是______。
A.Private Sub P1_MouseMove(Button As Integer,Shift As Integer,X As Single,Y
AsSingle) Print X,Y End Sub
B.Private Sub P1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y
AsSingle) Picture.Print X,Y End Sub
C.Private Sub P1_MouseMove(Button As Integer,Shift As Integer,X As Single,Y
AsSingle) P1.Print X,Y End Sub
D.Private Sub Form_MouseMove(Button As Integer,ShiftAs Integer,X As
Single,YAsSingle) P1.Print X,Y End Sub
单选题执行以下语句过程,在窗体上显示的内容是 Option Base 0 Private Sub Command3_Click( ) Dim d d=Array("a", "b", "c", "d" Print d(1) ; d(3) End Sub
单选题设通用对话框的名称为CD1,如,果希望在“打开”对话框中的“文件类型”列表中包含所有文件、Word 文档和文本文件,则应把Filter 属性设置为______ 。
单选题有如下程序代码:
Private Sub Form_Click()
Dim i As Integer, n As Integer
For i = 0 To 30
i = i + 3
n = n + 1
If i > 10 Then Exit For
Next i
Print n
End Sub
运行程序,单击窗体,输出结果是
单选题有如下程序: Function F(a As Integer) b = 0 Static C b = b + 1 c = c + 2 F = a + b + c End Function Private Sub Command1_Click() Dim a As Integer a = 2 For i=1 To 3 Print F(a); Next i End Sub 运行上面的程序,单击两次命令按钮,在窗体上输出结果为
单选题对图书进行编目时,图书有如下属性:ISBN书号,书名,作者,出版社,出版日期。能作为关键字的是______。
单选题下列关于水平滚动条的叙述中,错误的是( )。
单选题当前文件夹中设有一个文本文件File1.txt,并有下面程序代码:
Private Sub Command1_Click()
Dim ch As String
Open "File1.txt" For Input As #1
Do While Not EOF(1)
ch=Input(1,#1)
If "A"<ch And ch<"Z" Then
Print "
End If
Print ch;
Loop
Close #1
End Sub
上述代码运行时产生的结果是______。
单选题编写如下程序代码: Private Sub Command1_Click() Dim t As Integer Dim n As Integer,x As Integer t=0 For n=1 To 12 x=2*n一1 If x/3=x 3 Then t=t+1 Next Print t End Sub 程序运行后,单击命令按钮Command1,输出结果为( )。
单选题命令Picture1.Circle(500,800),800能够在图片框Picture中画出的图形是______。
单选题执行下面的程序段后,x的值为______ 。 X=5 For i=1 To 20 Step 2 x=x+ i/5 Next i
单选题假定有以下循环结构 Do Until条件表达式 循环体 Loop 则以下描述中正确的是
单选题在C盘当前文件夹下建立一个名为SDat.txt的顺序文件。要求用InputBox函数输入5名学生的学号(StuNo)、姓名(StuName)和英语成绩(StuEng)。则横线处合适的语句是{{U}}
{{/U}}。 Private Sub Form_Click()
Open"C:/SDat.txt"For Output As I
For i=1 To 5
StuNo=InputBox("请输入学号")
StuName=InputBox("请输入姓名")
StuEndg=Val(InputBox("请输入英语成绩")) Next
i Close #1 End Sub
A.Input#1,StuNo,StuName,StuEndg
B.Put#1,StuNo,StuName,StuEndg
C.Write#1,StuNo,StuName,StuEndg
D.Get#1,StuNo,SmName,StuEndg
单选题若要获得组合框中输入的数据,可使用的属性是______。
单选题设在窗体上有一个名称为Command1的命令按钮,并有以下事件过程: Private Sub Commandl Click() StatiC b As Variant b=Array(1,3,5,7,9) ... End Sub 此过程的功能是把数组b中的5个数逆序存放(即排列为9,7,5,3,1)。为实现此功能,省略号处的程序段应该是A) For i=0 To 5-1/2 tmp=b(i) b(i)=b(5-i-1) b(5-i-1)=tmp NextB) For i=0 To 5 tmp=b(i) b(i)=b(5-i-1) b(5-i-1)=tmp NextC) For i-0 To 5/2 tmp=b(i) b(i)=b(5-i-1) b(5-i-1)=tmp NextD) For i=1 To 5/2 tmp=b(i) b(i)=b(5-i-1) b(5-i-1)=tmp Next
单选题在列表框中,当前被选中的列表项的序号由下列( )属性表示。 A) List B) Index C) ListIndex D) TabIndex
单选题在窗体上画一个命令按钮,并编写如下事件过程: Private Sub
Command1_Click() For i=3 To 1 Step-0.4 Ptint
Int(i); Next i End Sub
运行程序,单击命令按钮,窗体上显示的内容为______。
A. 3 2 2 2 1 1
B. 3 2 2 1 1 1
C. 3 2 2 1 1
D. 3 2 1 1 1
单选题向顺序文件Temp.txt中写入1,2,3这3个数。在程序中加入以下语句的那项可以使程序功能完整。 Private Sub Command1_Click() Open"c:/Temp.txt",Output As #1 For i=0 To 3 ______ Next Close #1 End Sub