procedure TMainForm.WMSysCommand(var message: TWMSysCommand); begin if message.CmdType = SC_MINIMIZE then BlockMinimaze := True; if message.CmdType = SC_MAXIMIZE then BlockMinimaze := False; inherited; end;