在标题栏,但不是在任务栏中隐藏图标 [英] Hide icon in title bar but not in task bar

查看:144
本文介绍了在标题栏,但不是在任务栏中隐藏图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我想要在任务栏显示图标;不过,我不想要这个图标,在标题栏中显示。我试着设置 ShowIcon 来假的,但在这两个标题栏,任务栏隐藏我的图标。有没有什么办法可以只隐藏标题栏?

I have an icon that I want to display in the taskbar; however, I don't want this icon to display in the title bar. I tried setting ShowIcon to false, but that hides my icon in both the title bar and the task bar. Is there any way to only hide it in the title bar?

推荐答案

根据里兹差我来评论他的答案的链接,这是我使用的解决方案:

Based on the link Riz sent me in a comment to his answer, this was the solution I used:

using(Bitmap emptyImage = new Bitmap(1, 1))
    Native.SendMessage(this.Handle, Native.WM_SETICON, Native.ICON_SMALL, emptyImage.GetHicon());

这篇关于在标题栏,但不是在任务栏中隐藏图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆