title: How to make MessageDlg centered on owner form
body: <p>I'd like that MessageDlg appear centered on its parent form.
  Any suggestions on how to accomplish this in Delphi 2010?</p>
  
  <p>I found the code below here: <a href="http://delphi.about.com/od/formsdialogs/l/aa010304a.htm" rel="noreferrer">http://delphi.about.com/od/formsdialogs/l/aa010304a.htm</a> but it's not working for me. The pop-up still is not centered on the owner form. (It's not clear to me how the method would actually <em>know</em> the owner form...)</p>
  
  <pre><code> function TForm1.MessageDlg(const Msg: string; DlgType: TMsgDlgType;
     Buttons: TMsgDlgButtons; HelpCtx: Integer): Integer;
   begin
     with CreateMessageDialog(Msg, DlgType, Buttons) do
       try
         Position := poOwnerFormCenter;
         Result := ShowModal
       finally
         Free
       end
   end;
  </code></pre>