我有这段代码
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;