Imagelist and PNGs with alpha transparency

  • Thread starter Thread starter Slugsie
  • Start date Start date
S

Slugsie

In my VB.Net application I am using ImageLists to hold images for use by
toolbars/treeviews etc. The imagelist.colordepth properties are all set to
Depth32Bit, and then the Images collection is loaded with the various PNG
images, all at design time. The PNG files all have nice alpha blended edges,
and drop shadows.

When I run the application from within the VS.Net environment, everything
displays as I would expect it to. However, this is not so when the .exe is
run manually. If I don't use Application.EnableVisualStyles, then the alpha
blended edges are replaced with solid blue pixels around the icons. If I do
use Application.EnableVisualStyles, then I get no icons at all!

What am I doing wrong?

If I use a .manifest file, then it works correctly (irrespective of whether
I use Application.EnableVisualStyles or not). I thought that
Application.EnableVisualStyles was supposed to fix this sort of thing?

Running on Windows XP Pro, and using VS.Net 2003. All graphics drivers are
uptodate.
 
Back
Top