Click here to Skip to main content
13,052,022 members (62,363 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Can anybody please help me with a code sample or a solution to overlay icons in C#.Net?

Thanks in Advance.

here are few screen shots of the way i want it to be.
Posted 19-May-11 20:16pm
Updated 29-May-11 20:40pm
OriginalGriff 20-May-11 2:19am
What have you tried?
Anything yourself?
freakosandy 20-May-11 2:21am
i found a solution in c++, but i need it in C#. you have any solutions?? tried googling a lot. no luck :(
freakosandy 20-May-11 2:22am
also i found a COM coding in C# but then i have no idea of coding in COM :(
Dalek Dave 20-May-11 3:22am
Edited for Grammar.
Rate this: bad
Please Sign up or sign in to vote.

Solution 5

See this for creating shell overlay icons in .NET:

.NET Shell Extensions - Shell Icon Overlay Handers[^]
Marcus Kramer 13-Feb-13 16:01pm
Shameless advertising for your article... :) +5 even though it's a very old question... Cheers.
Dave Kerr 14-Feb-13 3:26am
Of course! But I think the project is useful and will be helpful for those looking over this question in the future :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You don't need icons. Icons are special multi-page resources which contain images of different resolution in the same file, typically 16x16 and 32x32. This is needed for collaboration with Windows and Shell. In applications, icons are only uses as application icons (so the application is shown correctly in the system tray and file managers/dialogs) and windows icons. With icons, OS selects the image of appropriate resolution. If you use icons anywhere else, their properties would be redundant. Technically, you can use them, but there is not reason for doing that.

For all other cases, bitmaps should be used. Icons also support transparent colors, but so do bitmaps if you store them as PNG.

There is no problem of overlay them. You can use bitmaps in control rendering using System.Drawing.Graphics.DrawImage or System.Windows.Forms.PictureBox.

freakosandy 20-May-11 2:52am
Your answer
sorry i was not clear in my question. my project should do something like this. for example.i add a new folder or file(willl handle it internally whether the file is new or old). now when the file is new.i wan a green tick mark on that particular file or folder(tick marks is another .ico file).
SAKryukov 20-May-11 3:20am
Still not clear. Can you reflect other people thoughts? Imagine someone explains this to you. Would you understand it?
freakosandy 20-May-11 3:27am
ok i will post a screenshot and explain it to you
freakosandy 20-May-11 4:38am
i've updated the question. please go through it
SAKryukov 20-May-11 23:24pm
OK, I guess I see what do you mean, so: do you need to extract icons from the applications? Why you're interested in overlay?
subha@m9online 28-Oct-11 3:05am
have you got solution for your question im too searching for this
freakosandy 28-Oct-11 3:07am
the only way possible is by using com coding.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

freakosandy 20-May-11 3:29am
i need it in c# ram :(
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

icon overlay sample code shows in this link
icon overlay[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100