# Getting transparent-background shell icons?

## Recommended Posts

BeanDog    1065
I'm using the example given at The Code Project for getting shell icons. As you see from the screenshot on that page, the icons are supposed to be smooth. Check out their sample executable on my computer. Woah! What's up with that? It's their sample program, just downloaded and compiled using Visual Studio 2003 Pro. Anyone else get the same results? And how do I fix it? My Windows Explorer certainly doesn't look like that, so there's got to be a good way to do this. ~BenDilts( void );

##### Share on other sites
hh10k    589
Maybe 8-bit alpha channels are only supported on XP?

##### Share on other sites
BeanDog    1065
I'm running XP Pro.

##### Share on other sites
outRider    852
Using Windows XP Visual styles.

Blended icons are part of the XP Visual style, which isn't used automatically.

##### Share on other sites
BeanDog    1065
Thanks for the tip on visual styles. It led me to some good Google searches resulting in this code:

// These two calls MUST be made before the// .Run method to enable 32bit icons to be used.Application.EnableVisualstyles();Application.DoEvents();

~BenDilts( void );