Delphi 任务栏中不显示窗口
程序员文章站
2022-06-15 14:25:25
示例: type TAppWndBrowser = class( TForm ) published procedure CreateParams( var Params: TCreateParams ); override; procedure WndProc(var Message: TMess ......
示例:
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;