Icon in Imagelist

Hello
I put an ImageList on my windows form and added an icon to the images collection property via the designer. Now when I use this icon in my form, for some reason the icon has a heavy black outline around it, where did this come from? When I look at the .ico file in windows explorer its perfect no ugly outline just a crisp graphic. I've been trying to change the properties of the ImageList but no joy. Any ideas on how I can resolve this? How does windows explorer manage to display the same ico file buit without the ugly outlining. PS I really don't wat to start editing the icons in a graphics app.
auk_ieAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dsaboCommented:
Check the size of the images on the imagelist. Maybe the image is deformed because it's smaller or larger
0
dunglaCommented:
Can you told me which control used icon from ImageList?

I have try to display icon from my ImageList (same as your) in PictureBox and it display correctly.

If you got the heavy black outline around it, it maybe the size of control displaying the icon is larger then the icon size
0
auk_ieAuthor Commented:
Hello I have a 16x16 pixel icon and have set the image list. This is what I done exactly, I extracted the trash can icon from shell32.dll and tried to put it on a toolbar button. but the shadow of the trash can shows up in jet black, rather than the nice faded shadow effect in windows explorer. This black shadow effect seems to happen to other icons aswell.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

dsaboCommented:
try setting the property ColorDepth of the ImageList to Depth32BIT
0
dunglaCommented:
Hi auk_ie,

I've try same way as your solution, one toolbar, one button on toolbar

toolBar1.Buttons[0].ImageIndex = 0;
toolBar1.Buttons[1].ImageIndex = 1;
toolBar1.Buttons[2].ImageIndex = 2;
toolBar1.ImageList = imageList1;

Where imageList1 contains 3 icons with size 16x16. Till working correctly, there is no black shadow effect. Or maybe you should try setting ColorDepth property of ImageList to Depth32BIT
0
auk_ieAuthor Commented:
I set the ColorDepth property to Depth32BIT but thats still the same. It beats me why it works for you and not me
0
Bob LearnedCommented:
How did you extract the icon from shell32.dll?

Bob
0
auk_ieAuthor Commented:
Using a tool called IconCool (they advertise it as Powerful Icon Library Manager and Icon Extractor) available from www.iconcool.com
0
Bob LearnedCommented:
What is the color depth of the source image?

Bob
0
auk_ieAuthor Commented:
How can I tell?
0
Bob LearnedCommented:
If you have Windows XP, the file properties (Summary tab) show the size and color depth.  If you don't, I am not quite sure how to find out.

Bob
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.