Vcl.Dialogs.ShowMessage

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure ShowMessage(const Msg: string);
procedure ShowMessage(const Msg: string; TaskDlgFlags: TTaskDialogFlags);

C++

extern DELPHI_PACKAGE void __fastcall ShowMessage(const System::UnicodeString Msg)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Dialogs.pas
Vcl.Dialogs.hpp
Vcl.Dialogs Vcl.Dialogs

Description

Displays a message box with an OK button.

Call ShowMessage to display a simple message box with an OK button. The name of the application's executable file appears as the caption of the message box.

Msg parameter is the message string that appears in the message box.

Params lists the values to insert into Msg if the Msg string includes formatting specifiers. For more information about how messages are formatted, see Format Strings.

Params_size is the index of the last value in Params (one less than the number of elements).

Note: To display a message in a message box with other buttons, or with an icon, use the MessageDlg function.

Note: If the user types Ctrl+C in the message box, the text of the message is copied to the clipboard.

See Also


Code Examples