变通一下:<br>function MyMessageDlgPosHelp(const Msg: string; DlgType: TMsgDlgType;<br> Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer;<br> const HelpFileName: string): Integer;<br>begin<br> with CreateMessageDialog(Msg, DlgType, Buttons) do<br> try<br> HelpContext := HelpCtx;<br> HelpFile := HelpFileName;<br> if X >= 0 then Left := Application.MainForm.Left + X - ClientWidth div 2;<br> if Y >= 0 then Top := Application.MainForm.Top + Y - ClientHeight div 2;<br> if (Y < 0) and (X < 0) then Position := poScreenCenter;<br> Result := ShowModal;<br> finally<br> Free;<br> end;<br>end;<br><br>[blue]MyMessageDlgPosHelp('your msg',mtInformation,[mbOK],0,Left+ Width div 2,TOP + Height div 2,'');[/blue]