Link to home
Start Free TrialLog in
Avatar of paulstamp
paulstamp

asked on

Extracting program Icons

I'm trying to write a simple routine to extract an icon from a specified file (ActiveX DLL) and add the icon to an imagelist for use in a listview control. I'm using ExtractIcon and DrawIcon APIs to put the icon into a picture box but if I try and save the icon using SavePicture, or use it directly in the Listimages Add method I get "invalid property value" or "invalid picture" respectively. Can anyone tell me what I'm doing wrong ?
Avatar of mcrider
mcrider

See HOWTO: Extract an Icon from a Windows Program
http://support.microsoft.com/support/kb/articles/Q185/8/83.ASP?LNG=ENG&SA=MSDN&FR=1 
 

Cheers!
Avatar of paulstamp

ASKER

This only solves the first part of the question - the bit I had working. Its the transferring of the picture to a listimage (or a file) that gives the error.
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks... it was the step setting the image property = the picture property that I was missing.
Thanks for the points! Glad I could help!


Cheers!