Dim FSO As Object
Private Sub Command1_Click()
Dim FLD As Object
Dim IMG As Object
Dim tmpImg As StdPicture
Set FLD = FSO.GetFolder(DirListBox1.Path)
lvwElenco.ColumnHeaders.Add , , "Anteprima", 3000
lvwElenco.View = lvwList
On Error Resume Next
W = 128 * Screen.TwipsPerPixelX
H = 96 * Screen.TwipsPerPixelY
Picture1.Width = W
Picture1.Height = H
ilsAnteprime.ListImages.Add , , Picture1.Image
Set lvwElenco.SmallIcons = ilsAnteprime
For Each IMG In FLD.Files
Set tmpImg = LoadPicture(IMG.Path)
Picture1.BorderStyle = 0
Picture1.AutoRedraw = True
Picture1.PaintPicture tmpImg, 0, 0, W, H
ilsAnteprime.ListImages.Add , , Picture1.Image
lvwElenco.ListItems.Add , , IMG.Name, , ilsAnteprime.ListImages.Count
DoEvents
Next
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Set FSO = CreateObject("Scripting.FileSystemObject")
End Sub
Private Sub Drive1_Change()
DirListBox1.Path = Drive1.Drive
End Sub