function MessageDlg(const AMessage: string; const ADialogType: TMsgDlgType; const AButtons: TMsgDlgButtons;
const AHelpContext: THelpContext): Integer; overload; inline; deprecated ‘Use FMX.DialogService methods’;
class procedure ShowMessage(const AMessage: string); overload;
class procedure ShowMessage(const AMessage: string; const ACloseDialogProc: TInputCloseDialogProc); overload;
class procedure ShowMessage(const AMessage: string; const ACloseDialogEvent: TInputCloseDialogEvent;
const AContext: TObject = nil); overload;
procedure TForm2.btnShowMessageClick(Sender: TObject);
begin
TDialogService.ShowMessage(‘您點選了OK按鈕‘, ShowMessageCloseMethod);
end;
procedure TForm2.ShowMessageCloseMethod(const AResult: TModalResult);
var
alvi : TListViewItem;
begin
alvi := ListView1.Items.Add;
alvi.Text := DateTimeToStr(Now);
alvi.Detail := ‘關閉了ShowMessage對話盒!’;
end;
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition