Show: Delphi C++
Display Preferences

FMX.Forms.TCommonCustomForm.ShowModal

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ShowModal: TModalResult; overload;
procedure ShowModal(const ResultProc: TProc<TModalResult>); overload;

C++

System::Uitypes::TModalResult __fastcall ShowModal(void)/* overload */;
void __fastcall ShowModal(const System::DelphiInterface<System::Sysutils::TProc__1<System::Uitypes::TModalResult> > ResultProc)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
FMX.Forms.pas
FMX.Forms.hpp
FMX.Forms TCommonCustomForm

Description

Shows the form as a modal dialog box.

Use ShowModal to show the form as a modal dialog box. When a modal form is opened the application cannot continue to run until the modal form is closed. Thus, ShowModal does not return until the form has closed. When the form has closed, it returns the value of the ModalResult property.

To close a modal form, set its ModalResult property to a nonzero value.

Tip: If the form contains buttons with a ModalResult property set to a value other than mrNone, the form automatically closes when the user clicks one of these buttons and returns the ModalResult value as the return value of ShowModal.

Caution: Modal dialog boxes are not supported in Android apps. We recommend do not use modal dialog boxes on either of the mobile platforms (iOS and Android) because unexpected behavior can result. Avoiding usage of modal dialog boxes eliminates potential problems in debugging and supporting your mobile apps.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance