How to set ico I want to use as application icon in c#?

纵饮孤独 提交于 2019-12-13 14:55:39

问题


Icon I set in properties is visible in taskbar and when on application window, but application icon in explorer is different.


回答1:


Could it be that the application icon you have set has different images at different icon sizes and this is why you are seeing a difference in explorer?

To test this, open your icon in Visual Studio. The different resolutions are listed (on my screen to the left). If you don't want to create all resolutions, just delete the ones you don't want and Windows will attempt to resize icons for you, although they will appear blocky in another resolution.




回答2:


Ok. Think I got this:

You've been setting the Icon property of your Frame, not the application. Since the frame gets its own entry on the task bar, you see the correct icon there.

To get the right icon for your executable, go to the executable project in your solution, and go to its properties. You'll see a setting on the Application tab for icon (Under Resources). Now, when you go to the .exe in explorer, it will have the right icon.




回答3:


If you're using Visual Studios, this can be set in the Application Properties (the Project menu, I believe). This is the same place you set your resources, target .net, etc.



来源:https://stackoverflow.com/questions/334231/how-to-set-ico-i-want-to-use-as-application-icon-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!