This example demonstrates how thumbnails might be displayed. If the thumbnail count is less than 5, the first thumbnail is displayed at the top of the control.
If the count is between 5 and 20, the 5th thumbnail is placed in the center row of the control. If the count is greater than 20, the last thumbnail is displayed in the last row of the control.
Private Sub cmdDisplayThumbs_Click()
ImgThumbnail1.ScrollDirection = Vertical 'Set vertical scrolling
Select Case ImgThumbnail1.ThumbCount
Case 1 To 4
ImgThumbnail1.DisplayThumbs 'Default parameters are
'ThumbNumber=1 and Option = 0
Case 5 To 20
ImgThumbnail1.DisplayThumbs 5, 1
Case Is > 20
ImgThumbnail1.DisplayThumbs ImgThumbnail1.ThumbCount, 2
End Select
ImgThumbnail1.Refresh
End Sub