1

I have a problem with the Setup of a C# application. Happens I have added an icon to the application (under project settings, on the form itself and on the shortcuts inside the setup), but the Icons do not appear on the shortcut I create on the desktop and Start Menu!

I have had this problem more than once, it appears to have something to do with Windows 7 and the resolution of the .ico file. I have solved it many times in the past trough trying (changing the resolution of the icon), but somehow this time it will not work.

Furthermore: If I use the wrong resolution (too high for example), the application won't start. Specially on Windows XP.

I hope you can help me. What resolution should I use? What is standard?

El Mac
  • 3,256
  • 7
  • 38
  • 58

2 Answers2

2

As you already mentioned, ico-file should contain several icons. You assign icon in the project properties, by setting Icon in Application category. Windows will choose most appropriate icon (when creating icon on desktop, to example).

You will surely need icon editor. I am using Greenfish Icon Editor Pro. It's free and seems cool.

Then you need to know about sizes, but it's very easy to find (also GFIE warns when you create icon which will be only valid for Vista or higher), to example, here.

Community
  • 1
  • 1
Sinatr
  • 20,892
  • 15
  • 90
  • 319
  • Thanks. I tried Greenfish Icon Editor Pro and it really works nice :) Maybe the Icon File was missing some resolutions. I will try it with XP later. – El Mac May 27 '14 at 08:38
  • 1
    It is weird to see a free software with a "Pro" tag though – mcy May 27 '14 at 09:08
  • That's what I was also thinking haha better I will read the T&C's – El Mac May 27 '14 at 09:09
0

put your icon in the same folder where you have your .xml, .c, .. files after that, on each window, add this property :

Icon='../iconName.ico'

you can place your icon at an other folder but make sur than your icon is into your project. but be carefull, because an icon file have 2 icons. one which have 32x32 size and an other which have 16x16. one is for taskbar and the other is for topleft corner of the window...

angel
  • 322
  • 1
  • 7
  • I am working with .NET Framework 3.5 and Winforms on Visual Studio 2008. How would I do that here? – El Mac May 27 '14 at 08:10
  • open your icon file with visual studio and edit it with you will have correct icon file for your .Net framework. – angel May 27 '14 at 08:15
  • after that, put your icon into your project if it you haven't do it. then in each winows, add into ` – angel May 27 '14 at 08:20
  • I think you can only do that in XAML based applications. Or am I wrong? – El Mac May 27 '14 at 08:24
  • C# files. On Windows Forms it's all C#. The problem must be the icon itself. I have added dozens of them already to other applications, it just doesn't work on this one. – El Mac May 27 '14 at 08:30
  • The icon is set in the project properties page. To open it right click on the project name in the solution explorer. in the page that opens, there is an Application tab, in this tab you can set the icon. – angel May 27 '14 at 08:42