Create(TComponent,TMsgDlgType,TMsgDlgButtons,THandle) Constructor
Creates a message dialog box form with support for DevExpress look & feel settings.
#Declaration
constructor Create(AOwner: TComponent; AType: TMsgDlgType; AButtons: TMsgDlgButtons; AOwnerWndHandle: THandle = 0); reintroduce; virtual;
#Parameters
Name | Type | Description |
---|---|---|
AOwner | TComponent | The owner form of the message dialog box. Pass a TCustom |
AType | TMsg |
A message dialog box type that determines the predefined caption, system icon, and sound of the message box. The Dialog |
AButtons | TMsg |
A set of buttons on the message dialog box form. |
AOwner |
THandle | A handle to the owner window of the message box. dx Use the |
#Remarks
Call this constructor to create a message dialog box form. Then, use the form’s Message property to specify the text string you need to display. Call the ShowModal procedure to display the message box.
#Code Example: Create and Display a Message Box Dialog
uses dxMessageDialog;
// ...
var
ADialog: TdxMessageDialogForm;
begin
ADialog := TdxMessageDialogForm.Create(nil, mtWarning, mbYesNoCancel);
try
ADialog.Message := 'One or more margins are set outside the printable area of the page.' + #13#10 +
#13#10 + 'Click the [B]Yes[/B] button to increase these margins.';
ADialog.ShowModal; // Invokes the message box as a modal dialog
finally
ADialog.Free; // Releases the message box form when a user closes it
end;
end;
#Alternative Dialog Creation Methods
- dxCreateMessageDialog
- Creates a message dialog box form with the specified settings.
- dxMessageBox
- Invokes a modal message dialog box.
- dxMessageDlg
- Invokes a modal message dialog box.
- dxMessageDlgPos
- Invokes a modal message dialog box at the specified position on the screen.
- dxMessageDlgPosHelp
- Invokes a message dialog box whose help topic is supplied in a specified help file.
- dxShowMessage
- Invokes a generic message dialog box with an OK button.
- dxShowMessageFmt
- Displays a message dialog box with a formatted message.
- dxShowMessagePos
- Invokes the message dialog box at the specified position on the screen.