winforms - 为Windows窗体制作图标: How to make it show up correctly?

标签 winforms icons

好的,我已经构建了一个 Windows 窗体应用程序。我现在想要一个它的图标。因此,我使用 Visual Studio 2012 中内置的图标编辑器。将其全部绘制出来,使其看起来漂亮又漂亮。完成后,我就有了一个 .ico 文件,并将其设为项目的默认图标,以及应用程序中一个 WinForm 的图标。

不幸的是,它没有像我创建的那样显示!它显示为默认图标文件,就像我在图标编辑器中修改它之前一样。这是一个 32x32 4 位图标。如果我将扩展名更改为 .bmp,它将显示为默认扩展名。

看起来 VS 图标编辑器正在编辑其他内容,而不是图标的外观。有人可以告诉我我做错了什么吗?

我曾经有一个名为 IconArt 的程序,当我在 VS 中使用它们时,它会创建看起来像图标的图标。 IconArt 现在是废弃软件,无法在我的 64 位 Windows 工作站上运行。

最佳答案

由于我在希望的时间内没有得到任何答案,所以我也在 MSDN Visual Studio 论坛中发布了这个问题,并得到了一个很好的答案,我认为我应该在这里发布。信用 Reed Copsey, Jr ,寻求答案!

就是这样:

You'll need to put your design in all of the different versions. ICO files contain multiple versions of the same image, for different screen resolutions.

My personal preference is to not use VS - there's an ICO plugin for Paint.Net (all free) which allows you to make a single image (typically 256x256), and save multiple versions within an ICO file in one shot. It's very useful for building icons.

See http://forums.getpaint.net/index.php?/topic/927-icon-cursor-and-animated-cursor-format-v37-may-2010/ for the plugin.

由于我是 Paint.Net 用户,该插件听起来是个好主意,所以我尝试了它。答对了!这非常有效。

关于winforms - 为Windows窗体制作图标: How to make it show up correctly?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18138173/

相关文章:

html5up 模板添加额外的 Font Awesome 图标

c# - 如何在 ProgressBar 上放置文本?

html - 如何将图标放在 <ul> 标签中?

c# - 如何更改文件扩展名的默认图标?

c# - 为什么 grid.Rows.Count 总是 0?

java - Swing & batik : Create an ImageIcon from an SVG file?

java - 在 Eclipse 的 WindowBuilder 中向按钮添加图标

c# - 如何随机生成1000个6位数字序列

c# - 将窗口置于最前面

c# - 修复 TableLayoutPanel 中每一行的行高