加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

vb.net – 不使用WS_EX_TOOLWIN隐藏表单的任务栏按钮

发布时间:2020-12-17 00:02:48 所属栏目:大数据 来源:网络整理
导读:我需要从任务栏隐藏Windows窗体但我不能使用WS_EX_TOOLWINDOW因为我需要系统菜单和窗体标题栏上的最小/最大按钮. 如果我在运行时将表单切换到工具窗口,表单蒙皮会被填满.从Web上搜索,我发现VB有一个ShowInTaskbar属性,我想知道这是否符合我的要求,是否可以在
我需要从任务栏隐藏Windows窗体但我不能使用WS_EX_TOOLWINDOW因为我需要系统菜单和窗体标题栏上的最小/最大按钮.

如果我在运行时将表单切换到工具窗口,表单蒙皮会被填满.从Web上搜索,我发现VB有一个ShowInTaskbar属性,我想知道这是否符合我的要求,是否可以在Delphi 2006中实现.此项目也是COM服务器,没有MainForm等.

有一个有趣的讨论这个确切的问题 here(从VB6 persepective).

从你的问题的角度来看,最相关的一点是:

“When you create a window,the taskbar
examines the window’s extended style
to see if either the WS_EX_APPWINDOW
(&H40000) or WS_EX_TOOLWINDOW (&H80)
style is turned on. If WS_EX_APPWINDOW
is turned on,the taskbar shows a
button for the window,and if WS_EX_
TOOLWINDOW is turned on,the taskbar
does not show a button for the window.
A window should never have both of
these extended styles. If the window
doesn’t have either of these styles,
the taskbar decides to create a button
if the window is unowned and does not
create a button if the window is
owned.”

Incidentally,you use the GetWindow API function with the GW_OWNER flag to determine whether a window is owned.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读