PDA

Click to See Complete Forum and Search --> : Show icon of exe file in Listview


supadits
Jan 8th, 2000, 12:32 PM
Hi

I read one tip in vb-world about extract icon from exe or dll file. I did it successfully. The problem is, I try to put that Picture object in ImageList for use with ListView but it give me an error "Out of Memory"!!!!!

Anyone know how to get to icon from exe file an put it in listview, Please help.

Thanks in advance

John
Jan 8th, 2000, 05:41 PM
Try using the intermediate step of a picture box. Put the icon into the picture box, and then put the icon from the picture box into the listview.


------------------
John Percival
Editor, VB-World.net
john@vb-world.net

supadits
Jan 8th, 2000, 09:25 PM
John,

I still got an error. This is my code

Private Sub Form_Activate()

Dim imgX As ListImage
Picture1.Picture = IconFromFile.GetIconFromFile("c:\windows\cdplayer.exe", 0, False)
Set imgX = imgProgList.ListImages.Add(, , Picture1.Picture)

End Sub

The Picture control show icon successfully but when it execute the next line it report an error "Out of Memory"

JeffSM
Jan 9th, 2000, 07:29 AM
I'll send you an e-mail with 2 bas files that can sold your problem.

It's the code that I use!

Boa sorte.
Jefferson

Jan 9th, 2000, 10:15 AM
Hey Jeff, would U mind e-mailing it to me too ? I'm cusrious about this glitch too..

Knight
kvision@gate.net