Icon MessageDlg

Unit: WebForms

Available In: Client Applications

procedure MessageDlg(const Msg: String;
                     const DlgCaption: String;
                     DlgType: TMsgDlgType;
                     const Buttons: TMsgDlgBtns;
                     MsgDlgResult: TMsgDlgResultEvent=nil;
                     CloseButton: Boolean=False;
                     OverlayColor: TColor=clBlack;
                     OverlayOpacity: Double=20;
                     AnimationStyle: TAnimationStyle=asNone;
                     AnimationDuration: Integer=0)

procedure MessageDlg(const Msg: String;
                     const DlgCaption: String;
                     DlgType: TMsgDlgType;
                     const Buttons: TMsgDlgBtns;
                     DefaultButton: TMsgDlgBtn;
                     MsgDlgResult: TMsgDlgResultEvent=nil;
                     CloseButton: Boolean=False;
                     OverlayColor: TColor=clBlack;
                     OverlayOpacity: Double=20;
                     AnimationStyle: TAnimationStyle=asNone;
                     AnimationDuration: Integer=0)

The MessageDlg procedure shows a modal message dialog.

The Msg parameter indicates the message to show.

The DlgCaption parameter indicates the caption of the dialog.

The DlgType parameter indicates the type of dialog to show.

The Buttons parameter indicates the array of button types to use on the dialog.

The DefaultButton parameter indicates which button should have focus when the dialog is first shown.

The MsgDlgResult parameter is a method reference that represents the event handler that will be called when the message dialog is closed.

The CloseButton parameter indicates whether the message dialog should contain a close button.

The OverlayColor parameter indicates the color to use for the shadow overlay effect that is used over the application desktop to indicate that a modal form is in effect.

The OverlayOpacity parameter indicates the percentage of opacity to use for the shadow overlay effect that is used over the application desktop to indicate that a modal form is in effect.

The AnimationStyle and AnimationDuration parameters indicate the type/duration of animation to use when showing the message dialog.

Examples

MessageDlg('Are you sure that you want to delete this record?',
           'Please Confirm',mtConfirmation,[mbYes,mbNo],mbNo,CheckDelete,True);
Image