begin if not pnlproject.visible=true then begin messagedlg('moo', mtInformation, [mbOk], 0); end else begin application.Minimize; end;