title: Delphi - form maximized event
body: <p>I want to call a function after a form has been maxmized or restored.
  I know I can something like this:</p>
  
  <pre><code>procedure TfrmMain.WMSysCommand;
  begin
     if (Msg.CmdType = SC_MAXIMIZE) OR (Msg.CmdType = SC_RESTORE) then
     begin
       Showmessage(IntToStr(frmMain.Height));
     end;
     DefaultHandler(Msg) ;
  end;
  </code></pre>
  
  <p>But the problem is: this event is fired before the form is actually resized - so when the form is maximized, I get the height of the form BEFORE it was maxmized (but I want the width of the form after it has been maximized).</p>
  
  <p>How to do this? Thanks!</p>