Vcl.Dialogs.TMsgDlgType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TMsgDlgType = System.UITypes.TMsgDlgType;

Properties

Type Visibility Source Unit Parent
enum public Vcl.Dialogs.pas Vcl.Dialogs Vcl.Dialogs

Description

TMsgDlgType defines values describing the type of message box.

The TMsgDlgType type defines the values describing the type of a message box. TMsgDlgType is used by the MessageDlg and MessageDlgPos functions.

The following table lists the possible values:

Value Meaning

mtWarning

A message box containing a yellow exclamation point symbol.

mtError

A message box containing a red stop sign.

mtInformation

A message box containing a blue "i".

mtConfirmation

A message box containing a blue "i". See the footnote.

mtCustom

A message box containing no bitmap. The caption of the message box is the name of the application's executable file.

Note::

Since RAD Studio XE6 the mtConfirmation symbol has changed from a blue question mark to a blue "i".

Microsoft removed the question mark symbol from the function that RAD Studio uses to display the message. Quoting Microsoft: "The question-mark message icon is no longer recommended because it does not clearly represent a specific type of message and because the phrasing of a message as a question could apply to any message type. In addition, users can confuse the message symbol question mark with Help information."

There is a workaround to use the previous message box, set the UseLatestCommonDialogs var from Vcl.Dialogs to False.

procedure TForm1.Button1Click(Sender: TObject);
begin
  UseLatestCommonDialogs := False;
  MessageDlg('Foo', mtCustom, [mbOk], 0);
end;

See Also

Code Examples