procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND;...
procedure TForm1.WMSysCommand(var Msg: TWMSysCommand);begin
if Msg.CmdType = SC_MINIMIZE then
hide;
else
inherited;
end;
или
procedure TForm4.WMSysCommand(var Msg: TWMSysCommand);
begin
if Msg.wParam = SC_MINIMIZE then
begin
hide;
end;
inherited;
end;
SC_CLOSE,SC_MINIMIZE