I have a listview working in virtual mode, in the LargeIcons view. Retrieves are expensive, so I want to ask for the data for all the visible items. How do I get the start
Try this:
If ListView.Items.Count > 0 Then
Dim lvi As ListViewItem = ListView.TopItem
If lvi Is Nothing Then Return
Dim startIndex As Integer = lvi.Index
Dim lastVisible As Integer = startIndex
While ListView.Items(lastVisible).Bounds.Bottom < Me.lvRes.Bounds.Bottom
lastVisible += 1
End While
lastVisible -= 1
End If