If InStr(List.List(k),s)>0 then
str=str&List.List(k)&” ”
End If
Next k
If str=””Then
Text2=”没有匹配的项目”
Else
Text2=str
End If
End Sub
程序运行时,在Text1中输入“京”,单击命令按钮,则在Text2中显示的内容是(C)
A) 京
B) 北京 南京
C) 南京
D) 没有匹配的项目
(31)在窗体上画1一个名称为Command1的命令按钮,并编写以下程序
Private Sub Command1_Click()
Print fun(“ABCDEFG”)
End Sub
Function fun(st As String) As String
stlen=Len(st)
temp=””
For k
fun=temp
End Function
程序运行时,单击命令按钮,则窗体上显示的是(B)
A)ABCDEFG
B)AGBFCE
C)GFEDCBA
D)AGBFCED
(32)在窗体上先后画2个图片框,名称分别为Picture1和banana,banana中添加了香蕉图片(见图1),且将banana.DragMode属性设置为1。要求程序运行时,可以用鼠标把banana拖拽到Picture1中(见图2)。能实现此功能的事件过程是(C)
A) Priate Sub Form_DragDrop(Source As Control,X As Single,Y As Single banana.Move Picture1.Left+X,Picture1.Top+Y)
End Sub
B)Private Sub banana _DragDrop(Source As Control,X As Single,Y As Single )
Source.Move Picture1.Left+X.Picture1.Top+Y
End Sub
C) B)Private Sub Picture1_DragDrop(Source As Control,X As Single,Y As Single )
Source.Move Picture1.Left+X.Picture1.Top+Y
End Sub
D) B)Private Sub Picture1_DragDrop(Source As Control,X As Single,Y As Single )
banana.Move banana.Left+X, banana.Top+Y
End Sub
(33)在窗体上画1个名称为Command1的命令按钮,然后编写如下事件过程
Option Base 1
Pribate Sub Command1_Click()
Dim a(5.5) As Integer
For i=1 To 5
a(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
程序运行后,单击命令按钮,输出结果是(A)
A) 15
B)13
C)11
D)9
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页
责任编辑:小草