Procedura:
'Uloží všechny obrázky
z komponenty ImageList do diskového souboru
'Obrázky mohou být později nahrány pomocí LoadImageList
'Pokud soubor existuje, bude přepsán
Private Sub SaveImageList(ImageList
As ImageList, _
ByVal FileName As String)
Dim pb As New PropertyBag
Dim varTemp As Variant
Dim handle As Long
pb.WriteProperty "IMG", ImageList.object
varTemp = pb.Contents
If Len(Dir$(FileName)) Then Kill FileName
handle = FreeFile
Open FileName For Binary As #handle
Put #handle, , varTemp
Close #handle
End Sub
|