Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 312
  • Last Modified:

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
0
wwarby
Asked:
wwarby
1 Solution
 
wwarbyAuthor Commented:
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.
0
 
Bob LearnedCommented:
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
0
 
Computer101Commented:
PAQed, with points refunded (125)

Computer101
E-E Admin
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now