方法1:
ListView.MultiSelect = True
Dim lstItem As MSComctlLib.ListItem
For Each lstItem In ListView.ListItems
If lstItem.Selected Then
...do yourself
End If
Next
方法2:
Dim nCount As Integer
Dim nIndex As Integer
Dim oitem As ListItem
With lvProc
nCount = .ListItems.Count
For nIndex = nCount To 1 Step -1
If .ListItems.Item(nIndex).Checked = True Then
.ListItems.Remove nIndex
End If
Next
End With
其实是一种算法,用于解决循环遍历,且遍历对象产总数要变化.