About viewing icons...

P

pnp

I want to display in a form all the icons of an icon file, that has icons
with both 32bit colordepth and 24bit colordepth, simultaneously.
I tried using ImageLists with different colordepth properties but the result
was that the icons that were displayed were all 32bit palleted, having my
systems' pallete set to 32bits and the 24bit ones were displayed only when
my systems' pallete was set to 16bit.

Is there a way to display all the icons simultaneously without changing the
systems pallete?

Thanks,
Peter
 
G

Guest

Hi!
i don't use icons with different colordepth but i know that there is a
problem to use icons with different size in the same imagelist so i hold few
imagelist, each imagelist has different size.

guy
 
S

Sijin Joseph

You can use the overloaded Icon constructor that takes a size parameter.
If an icon of that size is present in the file then that is used to
create the object. But you need to be careful here as if an icon of
therequested size is not present then it will simply create an icon of
the closest available size, which might just be a duplicate of the
orignal icon, so you need to check the size of the returned icon object
to make sure that it is the approrpiate size.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
 

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

Top