7

I have changed the icon in the Main Project Properties Icon and Manifest option. Yet, after running the App, the default Icon is what shows up.

Any idea why such odd behavior will occur?

Shamim Hafiz
  • 19,616
  • 36
  • 104
  • 164

2 Answers2

18

Does the default icon show up in the explorer or does it show up in the taskbar buttons? In case of the latter: change the icon for the forms as well, as the task bar button icon is not retrieved from the exe file, but from the form's Icon property.

For WPF applications, use the attribute

Icon="Images\Logo.ico"

for the Window element in XAML to have the window show the icon.

Thorsten Dittmar
  • 52,871
  • 8
  • 78
  • 129
  • It doesn't show up anywhere. I forgot to add, its a WPF application. Will edit my question soon. – Shamim Hafiz Jun 21 '11 at 11:40
  • 1
    If you select the ICO file in the project properties under "Symbol & Manifest" (not sure whether that's the name in English - I'm using German VS2010), after a recompile the EXE should have the icon (which you can verify in the Explorer. To use it for the WPF window, use something `Icon="Images\Logo.ico"` as an attribute for the window. – Thorsten Dittmar Jun 21 '11 at 12:41
  • It's actually Icon and Manifest :). And the part about Icon did the Job. Thanks. Please consider editing your answer to include that so it can be treated as direct answer to my question. – Shamim Hafiz Jun 21 '11 at 12:53
11

The icon doesn't show in debug / release mode, you need to run the application using ctrl+F5, source

shakram02
  • 6,936
  • 3
  • 17
  • 21