Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Mystical on February 14, 2006, 05:57 AM

Title: Export from ImageList[Resolved]
Post by: Mystical on February 14, 2006, 05:57 AM
   I searched for help google, pscode, microsoft if theres a way to export the images out of the Imagelist, no help found.. is this possible?

   I added my images to my ImageList along time ago deleted them and i'd like to get them back out -_-
Any ideas thx n advanced eaither leave a post or IM Me.


Edit: i've never had the need to do this untill now.. so i don't know nothing about it.
Title: Re: Export from ImageList
Post by: FrOzeN on February 14, 2006, 06:10 AM
Yes, this is very simple.

Private Sub Form_Load()
    SavePicture ImageList1.ListImages(1).Picture, "C:\picture.jpg"
End Sub


Pretty self explanatory from there on. Just use a loop to go through all the images. :)
Title: Re: Export from ImageList[Resolved]
Post by: Mystical on February 14, 2006, 06:24 AM
Thanks,

        Sad i couldn't think of somthing as easy as that. ;)
Title: Re: Export from ImageList[Resolved]
Post by: Hero on April 13, 2006, 06:52 PM
I had this problem and all I did to extract ALL of them at the same time was:

Private Sub Form_Load()
Dim X As Integer
For X = 1 To 'AMOUNT OF IMAGES IN IMAGELIST
        SavePicture IMAGELISTNAME.ListImages(X).Picture, App.Path & "\Icons\icon(" & X & ").jpg"
    Next X
End Sub
Title: Re: Export from ImageList[Resolved]
Post by: topaz on April 13, 2006, 09:46 PM
Pass the icon to a picture object and use SavePicture()
Title: Re: Export from ImageList[Resolved]
Post by: Joe[x86] on April 16, 2006, 05:32 AM
Three times, now, that solution has been given. =p