如何将 .ico 文件与编译后的 .exe 文件合并?

发布于 2024-09-24 07:58:49 字数 109 浏览 0 评论 0原文

如何将 .ico 文件与编译后的文件合并 .exe 文件?

如果没有 .ico 文件,exe 文件将在启动时崩溃... 我已经在项目属性中添加了 ico 文件,

提前致谢

how do you merge an .ico file with the compiled
.exe file?

without the .ico file, the exe file will crash upon booting...
I've already added the ico file in the project properties

thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

送君千里 2024-10-01 07:58:49

您需要将该文件添加为解决方案的一部分,作为项目解决方案中 .ico 文件的属性中的内容或嵌入资源。

You need add the file as part of the solution either as content or embedded resource within the properties of the .ico file in your project solution.

鯉魚旗 2024-10-01 07:58:49
  • 右键单击您的项目,添加,现有项目。
  • 导航到您的 .ico 并选择它。
  • 选择项目的主窗口。
  • 在(窗口的)属性下找到图标并展开省略号。
  • 单击您添加到项目中的图标。
  • Right-click your project, Add, Existing item.
  • Navigate to your .ico and select it.
  • Select the main window of your project.
  • Under properties (of the window) find icon and expand the ellipsis.
  • Click the icon you added to your project.
若有似无的小暗淡 2024-10-01 07:58:49

如果它们已添加到项目属性中,您可以使用代码访问它们。

Properties.Resources.<name of icon resource>

我希望这是准确的,因为我是在手机上写的:)

If they are already added to project properties, you can access them using the code.

Properties.Resources.<name of icon resource>

I hope this is accurate, as I'm writing this on my phone :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文