type
  TForm1 = class(TForm)
  private
    { Private declarations }
    procedure WMSysCommand(var Msg: TWMSysCommand);
      message WM_SYSCOMMAND;
  public
    { Public declarations }
  end;var
  Form1: TForm1;implementation{$R *.DFM}procedure TForm1.WMSysCommand;
begin
  if (Msg.CmdType = SC_MINIMIZE) Form1.Hide else
  inherited;
end;