hot to work with .icl files (icon library) in VB ???


I need to open a .icl file and extract one ico from it at random (at runtime of course) and I do not wat to extract each and every .ico within the .icl file manually only to use loadpicture() in VB...

Instead I want to be able to work directly with the .icl file, something like
Loadpicture("..../iconlib.icl", iconNumberSuch) or
Loadpicture("..../iconlib.icl", iconName)

I would also like to be able to create a new .icl file...

But I have found NO example of how to do this in VB? nothing on msdn, and other help sites...

Does anyone here have a working sample or source code to share or a pointer to a help site?

Thanks in advance
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

See this sample:

"Viewing and Retrieving Embedded Icons with ExtractIcon"
aquila98Author Commented:
I saw this sample but:
 hIcon = ExtractIcon(0&, sIconFile, index)
Call DrawIcon(Picture1.hdc, x, Y, hIcon)
Call DestroyIcon(hIcon)

this hIcon cannot be used in a treeview or in a menu or in any place where loadpicture should be used...

Unless there is a way to convert the hIcon to a IPicDisp? and then load it like it came from a loadpicture call???

I must set it on a status bas also so my requirement are as follows:
sbStatusbar.Panels(2).Picture= LoadPictureFramICL("iclfilename.icl", "icon name") or
sbStatusbar.Panels(2).Picture= LoadPictureFramICL("iclfilename.icl", iIconIndex)

See this sample code:

Create a VB Picture from an API Icon Handle

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.