Home > Back-end > Delphi android formclosequery events
Delphi android formclosequery events
Time:11-11
Var Check: Boolean; The begin Check:=False;
MessageDlg (' confirm exit? 'System. UITypes. TMsgDlgType. MtInformation, [TMsgDlgBtn. MbYes, TMsgDlgBtn. MBN. MbCancel], 0, Procedure (const AResult: TModalResult) The begin If AResult=mrYES thenCheck:=FalTrueeCancel ');
AnClose:=Check; end;
The same code in Windows platform will be a problem, why in the android platform can't close the window? Feel just skip the MessageDlg, if the first line to Check:=True, and will close the window directly,,, where is wrong, how to write properly display a prompt dialog box and allows the button? Changed many times, or not to display a message box directly, or shows the point after yes or no, either all, or will close the window, the trouble the great god help to find out what is going on, thank you! End); The results are directly related to the
//Use an anonymous method to make sure the acknowledgment appears as expected. Procedure (const AResult: TModalResult) The begin Case AResult of {Detect which button was pushed and show a company's message} MrYES: //Check:=False; //anClose:=Check; ShowMessage (' You chose, Yes');
MrNo: ShowMessage (' You chose, No '); MrCancel: ShowMessage (' You chose, Cancel '); end; End);