0

I have a problem when I add an Icon in my Windows Forms application. The icon is not displaying in the Taskbar:

I'm trying this:

this.Icon = new Icon(Application.StartupPath + "//" + "logo-pages.ico");
Sam
  • 7,252
  • 16
  • 46
  • 65
mahmoud
  • 409
  • 2
  • 5
  • 9
  • 1
    Possible duplicate of [how to add icon to application shortcut in desktop c#](http://stackoverflow.com/questions/31472297/how-to-add-icon-to-application-shortcut-in-desktop-c-sharp) – Salah Akbari Oct 17 '15 at 13:03
  • this.Icon = new Icon(Application.StartupPath + "//" + "logo-pages.ico"); working in load – mahmoud Oct 17 '15 at 13:56
  • @mahmoud Have you tried to add icon to your form in designer? – Reza Aghaei Oct 17 '15 at 14:16
  • @user2946329 Taskbar icon is the icon you set for form. That answer icon is application icon that will be used for application file or shortcut to application. – – Reza Aghaei Oct 17 '15 at 14:31
  • i had this before but it was only if i run the app in vs debugger try running the app from it's directory or maybe in Release mode – 0x3h Oct 17 '15 at 16:04
  • thanks all fine working have to solution add in designer form or coding in page load – mahmoud Oct 19 '15 at 05:44

0 Answers0