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

前端之家收集整理的这篇文章主要介绍了vb.net – 不使用WS_EX_TOOLWIN隐藏表单的任务栏按钮前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我需要从任务栏隐藏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.

原文链接:https://www.f2er.com/vb/255952.html

猜你在找的VB相关文章