Link to home
Start Free TrialLog in
Avatar of wwarby
wwarby

asked on

Incorrect Display of Windows XP Icons in VB.NET ImageLists and PictureBoxes

Hello,

I'm very new to .NET and assume this is a fairly basic problem. I am trying to make use of Windows XP (32 bit) icons with drop shadows in my application throughout, adding them to ImageLists and PictureBoxes. Every time I add an icon to an ImageList or PictureBox, even if I have ColorDepth property to Depth32Bit, it picks up the 256 color version of the icon. If I provide an icon that has no 256 color version, it takes the XP icon but downmixes it to 256 colors and makes the drop-shadow thick black which looks awful. Adding a Windows XP icon as the application's main icon however works just fine. Surely a development environment released post-Windows XP must be able to handle Windows XP icons, what am I doing wrong?

Would be extremely grateful for any help offered.

-William
Avatar of wwarby
wwarby

ASKER

Since posting, I've found one way round this problem which is to load the icon into the ImageList at runtime. This works as long as the application has a manifest file, but makes it difficult to manage toolbar buttons etc. at design time. I want to be able to add an image to an ImageList at design time and for it to import the 32 bit alpha-blended icon which I can then use in TreeViews, ListViews, Toolbars etc.
Avatar of Bob Learned
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial