当前位置: 移动技术网 > IT编程>开发语言>Delphi > Delphi 任务栏中不显示窗口

Delphi 任务栏中不显示窗口

2019年12月12日  | 移动技术网IT编程  | 我要评论

示例:

type
  tappwndbrowser = class( tform )
    published
      procedure createparams( var params: tcreateparams ); override;
      procedure wndproc(var message: tmessage); override;
  end;

implementation

{$r *.dfm}


{ tappwndbrowser }
procedure tappwndbrowser.createparams( var params: tcreateparams );
begin
  inherited createparams( params );
  params.style:=ws_child;
end;

procedure tappwndbrowser.wndproc(var message: tmessage);
begin
  inherited wndproc(message);
  if (not application.mainformontaskbar) and (message.msg = wm_showwindow) then
  begin
    showwindow(application.handle, sw_hide);
    setwindowlong(application.handle, gwl_exstyle, ws_ex_toolwindow);
  end;
end;

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网