poco
poco

Reputation: 3005

Icon transparency issue

I have created an icon with a transparent background. When I set the icon in my main app, build the project, create a shortcut to my .exe the icon now has a white background instead of transparent.

I started a brand new test project... do the exact same thing and the icon keeps its transparency. So now i know there is nothing wrong with my icon but for the life of me can't figure out where the white background is coming from in my main app.

The only thing in my main app that deals with transparency is the splash screen. But I'm not seeing how these would be connected in any way... I'm out of ideas on what could be causing this. Has anyone run into this before?

Upvotes: 1

Views: 3950

Answers (2)

Darren
Darren

Reputation: 21

Had the same problem in Visual C# 2010 Express. Since this version doesn't have a "clean build" command, to fix I exited studio, then did a thorough clean: deleted contents of all debug, release and obj dirs, plus deleted the .suo file. Reloaded via the open command. Icon now had transparent background. Seems like studio is caching the icon file in one of those places. See below on clearing IconCache.db.

Upvotes: 2

Emond
Emond

Reputation: 50702

Many icon files contain multiple icon sizes. Are you sure that in both test cases you are using the same icon (size) and that all icons versions are transparent?

Upvotes: 3

Related Questions