单选题
窗体上有一个命令按钮Commalld1和一个列表框List1。先选择列表框中的某一个项目,然后单击命令按钮,将该项目从列表框删除。程序如下:
Private Sub Command1_Click()
Dim In As Integer
In=______
List.Removc Ind
End Sub
则在程序的空白行的语句是( )。
A、
List1.Index
B、
List1.ListIndex
C、
List1.Text
D、
List1.ListCount
【正确答案】
B
【答案解析】
[解析] Index属性返回或设置惟一的标识控件数组中一个控件的编号;ListIndex属性返回或设置控件中当前选择项目的索引; ListCount属性返回列表控件中项目的个数;Text属性返回列表框中选择的项目,是string类型,这里需要一个数值类型,所以使用 ListIndex。
提交答案
关闭