试试这个函数MessageDlgPos:
Displays a message dialog box at the specified screen coordinates.
Unit
QDialogs
Category
dialog and message routines
function MessageDlgPos(const Msg: WideString; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer; DefaultBtn: TMsgDlgBtn = mbNone; Bitmap: TBitmap = nil): Integer;
Description
Call MessageDlgPos to bring up a message box at a particular location when you do not need to specify a caption. (If you need to specify the caption as well, use the MessageDlg function).
Msg is the content of the message that appears.
DlgType indicates the purpose of the dialog.
Buttons indicates what buttons should appear in the message box.
HelpCtx specifies the context ID for the help topic that should appear when the user clicks the help button or presses F1 while the dialog is displayed.
X and Y specify the screen coordinates where the dialog should appear. A value of ? means that the message box can appear anywhere in the specified dimension.
DefaultBtn specifies which button from among those specified by Buttons is the default button for the dialog. If DefaultBtn is mbNone, there is no default button.
Bitmap is an image that appears on the face of the message dialog. If Bitmap is nil, there is no image unless DlgType is mtConfirmation.
MessageDlgPos returns the value of the button the user selected. The following table lists the TMsgDlgBtn values for each type of button that can appear in the message box, and the corresponding value that is returned if the user selects that button:
TMsgDlgBtn Value Corresponding return value
mbOk mrOk
mbCancel mrCancel
mbYes mrYes
mbNo mrNo
mbAbort mrAbort
mbRetry mrRetry
mbIgnore mrIgnore