是否可以在运行时更改模式和非模式表单标题栏中的表单图标?
使用Delphi 2010。
我正在寻找(可能)一个可以传递TForm & 的函数或过程。一张图像(TImage 或 TBitmap),它可以更改表单图标,覆盖当前图标,或在特定位置写入新图标,并在必要时调整标题。必须同时使用模态和非模态形式。
示例:
procedure ChangeFormIcon(AForm: TForm; AIcon: TBitmap;
欢迎所有其他建议
感谢
Using Delphi 2010.
I am looking for (possibly) a function or procedure which can be passed a TForm & a image (TImage or TBitmap) and it can change the forms icon, either overwriting the current one, or writing the new one in a particular location, adjusting the caption when necessary. Must work with both modal and non-modal forms.
Example:
procedure ChangeFormIcon(AForm: TForm; AIcon: TBitmap;
All other suggestions welcomed
Thanx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的事情应该做你想做的事。我假设您正在使用 32bpp 位图,并可能进行 alpha 混合。如果您想使用基于遮罩的透明度,那么您需要重新编写代码以创建适当的遮罩位图。
Something like this should do what you want. I've assumed that you are using 32bpp bitmaps with, potentially, alpha blending. If you want to use mask based transparency then you would need to re-work the code to create an appropriate mask bitmap.