我有这段代码
procedure TFormMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
var
msg: String;
begin
msg := 'Do you really want to exit?';
if MessageDlg(msg, TMsgDlgType.mtConfirmation,
[TMsgDlgBtn.mbYes, TMsgDlgBtn.mbNo], 0) = mrNo then
CanClose := False
else
CanClose := True; { FIXME: don't want to work on Android }
end;
它在 Windows 上完美运行。如果我选择“是”,应用程序将关闭。但是,应用程序不会在 Android 上关闭。我做错了什么?