c# - 如何调整通知图标的大小?
问题描述
_notifyIcon = new NotifyIcon();
_notifyIcon.Icon = Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);
_notifyIcon.BalloonTipClosed += (s, e) => _notifyIcon.Visible = false;
_notifyIcon.Visible = true;
_notifyIcon.ShowBalloonTip(3000, "Title here", "Message displayed.",
ToolTipIcon.None);
如果我将最后一行更改为TooltipIcon.Warning
或其他任何内容(信息等),它将显示这样的大图:
但在我的情况下,我将假设我在通知中收到的图片太小的原因是因为它采用了原始大小(因为它是一个图标)。那么,如何调整它的大小呢?
解决方案
.ico 文件可以包含多个不同分辨率的不同图像。似乎您需要为现有文件添加适当的分辨率,以便它显示适当的大小...有关更多信息,请参见以下链接... https://superuser.com/questions/491180/how-do- i-embed-multiple-sizes-in-an-ico-file
如果你使用 Visual Studio,它有一个内置的图标编辑器,支持嵌入多种分辨率。
推荐阅读
- flutter - 如何在不更新的情况下在已发布的 Flutter 应用中添加新项目
- c++ - 如何使用 libclang 处理 if init 语句(c++17)
- django - 使用 django tables2 和 django_filters 时如何过滤连接的值
- google-api - 谷歌日历 API 配额:千人使用一个谷歌账户
- azure - 应用自定义域后,Azure 上的 Web 应用加载缓慢
- c++ - 使用 snappy 获取未定义的引用错误
- ios - iOS 中的应用内评分功能及其限制
- python - Python的set数据类型数据的内容是否会被排序
- ajax - 在 laravel 中使用模态引导显示特定数据
- python - 尝试使用 Python 中的 Scapy 模块更改 DNS 数据包中的“rdata”时出错