[单项选择题] 窗体上有一个命令按钮Command1和一个列表框List1。先选择列表框中的某一个项目,然后单击命令按钮,将该项目从列表框删除。程序如下: Private Sub Command1

11 查阅

[单项选择题] 窗体上有一个命令按钮Command1和一个列表框List1。先选择列表框中的某一个项目,然后单击命令按钮,将该项目从列表框删除。程序如下: Private Sub Command1_ClickO Dim In As Integer In=______ List. Remove Ind End Sub 则在程序的空白行的语句是( )。

A.List1.Index

B.List1.ListIndex

C.List1.Text

D.List1.ListCount

参考答案:

B

Index属性返回或设置惟一的标识控件数组中一个控件的编号;ListIndex属性返回或设置控件中当前选择项目的索引; ListCount属性返回列表控件中项目的个数;Text属性返回列表框中选择的项目,是string类型,这里需要一个数值类型,所以使用 ListIndex。

计算机考试