Hide your application from the taskbar

type
    procedure WMSysCommand(var Message: TWMSysCommand); message
                           WM_SysCommand;
...

procedure TForm1.FormShow(Sender: TObject);
var
   Owner: HWnd;
begin
     //Hide from taskbar when the form is shown
     Owner:=GetWindow(Handle,GW_OWNER);
     ShowWindow(Owner,SW_HIDE);
end;

procedure TForm1.WMSysCommand(var Message: TWMSysCommand);
begin
     //Prevent the application to show up again after minimizing
     if Message.CmdType and $FFF0 = SC_MINIMIZE then Hide
        else inherited;
end;

 

Copyright 2001-2005 (C) ykwong.com All rights reserved.