单选题
VB
题号 #483717
设在窗体中有一个名称为Li st1的表框,其中有若干个项目(如图)。要求选中某一项后单击Command1按钮,就删除选中的项,则正确的事件过程是( )
A.Private Sub Command1 _Click()
List 1.Clear
End Sub
B.Private Sub Command1 _Click()
List1.Clear List1.Listlndex
End Sub
C.Private Sub Command 1 _Click()
Ljst1.RemoveItem List1.Listlndex
End Sub
D.Private Sub Command 1 _Click()
List1.Removeltem
End Sub

参考答案
C
答案解析
列表框的Listlndex属性表示已选中表项的位置。删除指定索引值的表项用列表框的Removeltem方法。所以,答案是C。
你可能感兴趣的试题
A.通过属性窗口把计时器的Interva1属性设置为2000
B.通过属性窗口把计时器的Enabled属性设置为False
C.把事件过程中的Label1.Caption=TimeS语句改为Timer1.Interval=Time
D.把事件过程中的Label1.Caption=TimeS语句改为Label1.Caption=Timer1.Time
A.Picture1.Picture=“File1.jpg ”
B.Picture1.Picture=LoadPicture(“File1.jpg”)
C.LoadPicture(“File1.jpg”)
D.Call LoadPicture(“File1.jpg”)



