Show: Delphi C++
Display Preferences

FMX.Platform.IFMXDialogServiceAsync.ShowMessageAsync

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure ShowMessageAsync(const AMessage: string); overload;
procedure ShowMessageAsync(const AMessage: string; const ACloseDialogProc: TInputCloseDialogProc); overload;
procedure ShowMessageAsync(const AMessage: string; const ACloseDialogEvent: TInputCloseDialogEvent;  const AContext: TObject = nil); overload;

C++

virtual void __fastcall ShowMessageAsync(const System::UnicodeString AMessage) = 0 /* overload */;
virtual void __fastcall ShowMessageAsync(const System::UnicodeString AMessage, const Fmx::Dialogs::_di_TInputCloseDialogProc ACloseDialogProc) = 0 /* overload */;
virtual void __fastcall ShowMessageAsync(const System::UnicodeString AMessage, const Fmx::Dialogs::TInputCloseDialogEvent ACloseDialogEvent, System::TObject* const AContext = (System::TObject*)(0x0)) = 0 /* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.Platform.pas
FMX.Platform.hpp
FMX.Platform IFMXDialogServiceAsync

Description

Displays a dialog box with the specified message and an OK button.

ShowMessageAsync works asynchronously. Calls to ShowMessageAsync finish instantaneously, they do not wait for the user to close the dialog box. To work synchronously, use IFMXDialogServiceSync.ShowMessageSync. FMX.Dialogs.ShowMessage works differently depending on the run-time platform.

ShowMessageAsync receives the following parameters:

When the user closes the dialog box, ShowMessageAsync calls the specified anonymous method or event handler with the following arguments:

  • Sender (ACloseQueryEvent only) contains the specified AContext.
  • AResult is the modal result value of the button used to close the dialog box.

To call ShowMessageAsync without the need of an instance of IFMXDialogServiceAsync, use TDialogServiceAsync.ShowMessage instead.

Platform Support

Platform Support
Windows
YesC++11Feature.png
OS X
YesC++11Feature.png
iOS
YesC++11Feature.png
Android
YesC++11Feature.png

See Also

Personal tools
In Other Languages
Previous Versions
Assistance