Choosing icons

  • Thread starter Thread starter Krazitchek
  • Start date Start date
K

Krazitchek

Hi, how to navigate between icons stored in shell32.dll
(or other .dll), choose one of them with the index, and
one particular format of the choosen icon (16 colors, 256
colors, XP) ?

How to know the number of icons in the file ?

Thanks in advance for your help.
 
Krazitcheck,

Take a look at the Win32 API functions ExtractIcon and ExtractIconEx. With
certain sets of parameters, it will return the total number of icons in the
library; with others it will return all the handles for the icons.

One important thing to note--for *every* handle you get back, you should use
Icon.FromHandle to encapsulate it, as that'll ensure that the CLR will free
the handles when they go out of scope.

--Oren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top