题目
窗体上有一个名为List1的列表框,其中已经输入了若干个项目(如图所示);
还有两个文本框,名称分别为Text1、Text2,一个名称为Command1的命令按钮,并有以下程序: Private Sub Command1_Click() Dim str As String,s As String,k As Integer s=Text1 str="" For k=List1.ListCount-1 To 0 Step-1 IfInStr(List1.List(k),s)>0 Then str=str&List1.List(k)&" " End If Next k If str="" Then Text2="没有匹配项目" Else Text2=str End If End Sub 程序运行时,在Text1中输入“京”,单击命令按钮,则在Text2中显示的内容是______。
A.京
B.北京 南京
C.南京 北京
D.没有匹配的项目
第1题
设窗体上有一个名为List1的列表框,并编写下面的事件过程:
Private Sub List1_Click()
Dim ch As String
ch=List1.List(List1.Listlndex)
List1.RemoveItem List1.Listlndex
List1.Addltem ch
End Sub
程序运行时,单击一个列表项,则产生的结果是()。
A.该列表项被移到列表的最前面
B.该列表项被删除
C.该列表项被移到列表的最后面
D.该列表项被删除后又在原位置插入
第2题
A.List1.List
B.List1.ListIndex
C.List1.Index
D.List1.Text
第3题
窗体上有一个命令按钮Command1和一个列表框List1,其中List1有0、1、2、3、4的内容,有下列程序: Private Sub Command1_Click() Dim i,s For i=0 To List1.ListCount s=s+List1.List(i) Next i Print s End Sub 程序运行后,单击命令按钮,则窗体上显示的是
A.0
B.10
C.01234
D.程序出错
第4题
A.List1.List
B.List1.ListIndex
C.List1.Index
D.List1.Text
第5题
A.List1.List
B.List1.ListIndex
C.List1.Index
D.List1.Text
第6题
A.List1.List
B.List1.ListIndex
C.List1.Index
D.List1.Text
第7题
A.List1.List
B.List1.ListIndex
C.List1.Index
D.List1.Text
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!