SP2 Imagelist Bug

J

John Kirk

I posted on this a couple of weeks ago with reference to SP1 but got no
response however it seems the problem still exists with SP2. There was no
problem with the initial CF release.

The problem is that if you have an imagelist which is built using .ico files
(raw image format = png) then any transparent pixels are shown black.
Images created from other image formats (gif, jpg) are ok. As icon files
typically have large areas of transparent pixels this is a problem i.e. your
images look pretty much the same (mostly black.) I'm sure Henry Ford would
be ok with this but it's very annoying for me - I now have an awful lot of
icons to convert to gif and replace in my imagelists.

It occurs on Pocket PC 2003 Device and Emulator (I haven't tested any other
but I can't imagine it would be any different) and I can easily reproduce
it. It occurs with the imagelist bound to both treeview and listview
controls. Just create a new project, add a listview and an imagelist, throw
some icons in the imagelist, add some data to the listview and you will see
it.

Can someone confirm this happens for them (so I know it's not just me) and
if anyone has any ideas other than rebuilding the imagelists with gif files
I'd appreciate it.

Thanks,
John
 
P

Peter Foot [MVP]

This is an issue with the designer - if you add Icons to an image list
through Visual Studio they are stored in the imagelist as Bitmaps and these
don't correctly handle the transparency support. However if you add Icons to
the ImageList through code these should be correctly inserted as Icons and
retain their transparency...

Peter
 
J

John Kirk

Thanks for the suggestion Peter, although I assume that means I'd have to
deploy all the images with my application as well. I think I'll just
convert all my icon files to gifs and start again. Something nice and
mindless for the festive season....

I accept that the designer may be having trouble with transparency
converting ico to a bmp but still, something still must have changed in the
framework from the initial release to SP1 (and carried on in SP2). As I
said it all worked fine without the service packs and I haven't changed
anything in VS.Net. In fact all I did when I first found the problem was
install the service pack on my iPAQ and then start the application. A
change in the framework has broken something that used to work. Anyway I
guess it's not going to get changed back in a hurry so I think I'll just
work around it and forget about it.

John
 
P

Pete Vickers [eMVP]

Hi John,
if you set them as embedded resource and load them through code, they get
compiled with your code, and thus you don't have to download them

Pete


--
Pete Vickers
Microsoft Windows Embedded MVP
HP Business Partner
http://www.gui-innovations.com
 
J

John Kirk

Thanks Pete.

Excellent idea, and I guess having a bit more control over when the images
get loaded into the list should improve my form load time as well.
 
E

Eelco Akker

Having the same problem here too, with a Dell Axim X5 with PPC 2003.

Greets,

Eelco
 
J

John Kirk

And I've just noticed that it also affects PictureBox controls that have
been created with an icon file.
 

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

Similar Threads


Top