Private Sub Form_Load()
Dim sPath As String
'Set properties for controls
lstFiles.Visible = False
'Set Thumbnail Size
ImageList1.ImageHeight = 48
ImageList1.ImageWidth = 48
'Set path for files
sPath = "E:\winnt\"
'Get list of files
LoadFilestoList lstFiles, sPath, "*.bmp"
'Load all BMP files to imagelist
For i = 0 To lstFiles.ListCount - 1
ImageList1.ListImages.Add i + 1, lstFiles.List(i), LoadPicture(sPath & lstFiles.List(i))
Next i
'Set Listview ImageList to current ImageList
ListView1.Icons = ImageList1
'Add all files to listview
'NOTE: I know this seems redundant, but you have to initialize
'the image list FIRST before adding it as the ICONS source
'for the ListView.
For i = 0 To lstFiles.ListCount - 1
ListView1.ListItems.Add i + 1, lstFiles.List(i), lstFiles.List(i), lstFiles.List(i)
Next i
End Sub