我正在使用Visual Studio 2013开发Windows应用程序,F#
但无法更改默认应用程序图标。
我试图为字体结尾创建一个C#-WPF应用程序,它可以正常工作。但是我不想将C#用于字体结尾。
在构建我的应用程序后,我还尝试了资源黑客,但它无法正常工作。
应用程序图标是查看EXE文件时显示在Windows资源管理器中的图像。设置F#Windows应用程序的应用程序图标:
创建一个带有* .rc扩展名的文本文件。
一个行添加到* rc文件(当然代替你的图标文件名): 1 ICON "icon.ico"
。
将带有rc.exe的* .rc文件编译为* .res文件。
In Visual Studio, in the property page for your *.exe project, set the *.res file as your project's "Resource file."
While we are on the topic, the icon that appears in the Windows task bar comes from the main window icon. It can be set like this:
Sample:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Icon="/MyAssemblyName;component/MyPathToIcons/Logo.ico">
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句