About viewing icons...

  • Thread starter Thread starter pnp
  • Start date Start date
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
 
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
 
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
 
Back
Top