A、Listbox1.Items.Cls
B、ListBox1.Items.Remove(4)
C、ListBox1.Items.Remove(“计算机“)
D、ListBox1.Items.Add(1,“打印机“)
第1题:
在窗体上画一个名称为List1的列表框,列表框中显示若干城市的名称。当单击列表框中的某个城市名时,该城市名消失。下列在List1_Click事件过程中能正确实现上述功能的语句是
A.List1.Removeltem List1.Text
B.List1.Removeltem List1.CIear
C.List1.Removeltem List1.ListCount
D.List1.Removeltem List1.Listlndex
第2题:
A、ListBox1.Items(ListBox1.Items.Count)
B、ListBox1.Items(ListBox1.Items.Count-1)
C、ListBox1.Text
D、ListBox1.Items(ListBox1.SelectedIndex)
第3题:
在下列语句中,(30)是真命题。
A.计算机程序只能存储在内存中
B.如果1+1=3,那么4+3=7
C.如果1+2=4,那么雪是黑的
D.严禁考试作弊
第4题:
在窗体中添加一个列表框(listBox1)和一个命令按钮,并编写如下代码:Private Sub Command1_ Click() Dim Entry, I, Msg Msg = "Choose Ok to add 100 items to your list box." MsgBox Msg for I = 1 To 100 Entry = "Entry" & I List1. AddItem Entry Next IEnd Sub程序完成的功能是______。
A.本示例使用AddItem方法增加100项给一个列表框
B.本示例使用AddItem方法向一个列表框中添加的内容是1~100的列
C.本示例使用AddItem方法向一个列表框中添加的内容是1~100的和
D.本示例使用AddItem方法增加101项给一个列表框
第5题:
A、ListBox1.Items.Add(“HowareYou“)
B、ListBox1.Items.Insert(“HowareYou“)
C、ListBox1.Items.Add(2,“HowareYou“)
D、ListBox1.Items.Insert(2,“HowareYou“)
第6题:
A. 移去第一项
B. 移去最后一项
C. 程序无操作
D. 程序出错
第7题:
A.将打印机电缆接在计算机上就可直接使用
B.用打印机的驱动盘启动计算机
C.从“开始”菜单的“设置”中选择“打印机”后,双击“添加打印机”进行安装
D.直接就能使用
第8题:
设有数组定义语句:Dim a(5) As Integer,List1为列表框控件。下列给数组元素赋值的语句错误的是
A.a(3)=3
B.a(3)=InputBox("inputdata")
C.a(3)=List1.Listlndex
D.a=Array(1,2,3,4,5,6)
第9题:
下列语句中,获得列表框List1中项目个数的语句是
A.x=List1.ListCount
B.x=ListCount
C.x=List1.Listlndex
D.x=ListIndex
第10题:
下列语句中,获得列表框Listl中项目个数的语句是
A.x=List1.ListCount
B.x=ListCount
C.x=List1.ListIndex
D.x=ListIndex