tags:

views:

40

answers:

1

I have both dark and light versions of my application icon; the dark version works best on gray surfaces such as Windows XP taskbar, where the light version works best as an icon in the titlebar.

Is there a way I can set the icon in the taskbar to a different icon than the one used in my form in C# (P/Invoke is fine)?

A: 
this.Icon = Icon.ExtractAssociatedIcon(@"\icon\MyOwnIcon.ico");

If you are trying to get the icon from Resources, there are some more steps involved in converting Bitmap to Icon. I will be trying it and if successful, i will post it here.

Ranhiru Cooray
That sets the icon for both the taskbar AND the form titlebar. I need to have them different icons.
Hach-Que
I see. Just curious, but wouldn't it be aesthetically pleasing to have both the icons same? At least that is what I am used to in ALL my applications. But i failed in answering your question, sorry!
Ranhiru Cooray