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.

相关文章

Format[$] ( expr [ , fmt ] ) format 返回变体型 format$ 强...
VB6或者ASP 格式化时间为 MM/dd/yyyy 格式,竟然没有好的办...
在项目中添加如下代码:新建窗口来显示异常信息。 Namespace...
转了这一篇文章,原来一直想用C#做k3的插件开发,vb没有C#用...
Sub 分列() ‘以空格为分隔符,连续空格只算1个。对所选...
  窗体代码 1 Private Sub Text1_OLEDragDrop(Data As Dat...