如何在C#中设置要用作应用程序图标的ico? [英] How to set ico I want to use as application icon in c#?
问题描述
我在属性中设置的图标在任务栏和应用程序窗口中可见,但是资源管理器中的应用程序图标不同.
Icon I set in properties is visible in taskbar and when on application window, but application icon in explorer is different.
推荐答案
好.认为我明白了:
您一直在设置Frame(而不是应用程序)的Icon属性.由于框架在任务栏上有自己的输入项,因此您会在此处看到正确的图标.
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.
要获取可执行文件的正确图标,请转到解决方案中的可执行项目,然后转到其属性.您将在应用程序"选项卡上看到一个图标设置(在资源下).现在,当您在资源管理器中转到.exe时,它将具有正确的图标.
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.
这篇关于如何在C#中设置要用作应用程序图标的ico?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!