ViewSize example for Visual Basic
Dim nSize As Long
Dim nFirst As Long
Dim nLast As Long
Dim nCols As Long
Dim nCount As Long
'NOTE: assume scroll style = SCROLLSTYLE_VERTICAL
'get the view size
nSize = LEADRasImgList1.ViewSize
'get the first visible item
nFirst = LEADRasImgList1.FirstVisibleItem
'get the column count
nCols = LEADRasImgList1.ColumnCount
'calculate the index of last visible item
nLast = nFirst + (nSize * nCols) - 1 '0 based index
nCount = LEADRasImgList1.Count
If (nLast > nCount - 1) Then
nLast = nCount - 1
End If
MsgBox "nSize " & nSize & vbNewLine & "nFirst " & nFirst & vbNewLine & "nLast " & nLast & vbNewLine & "nCols " & nCols & vbNewLine & "nCount " & nCount