TMSFMXTaskDialog in Common Function

In the past I've used a common function with the TaskDialog to prompt a user whether to save the response and not prompt them again.  I save the response and check each time the user performs that function.  The common function returns the modal result of the TaskDialog to the calling form which then performs the action based on the response.  With the TFMXTaskDialog, because of the Show method (instead of ShowModal) the dialog "procedure" is handled asynchronously and so the procedure that called the common function completes before the task dialog response is captured.  Something along the lines of:


function MsgDontShowAgain (aMsg, aInstruction: string; aMsgType: TMsgDlgType; aButtons: TMsgDlgButtons) : TModalResult;
var
  Results: TModalResult;
begin
  //Check if “don’t show” was previously selected.  If selected then exit.
  ...
  TaskDialog := TTMSFMXTaskDialog.Create(nil);
  //Set dialog properties
  TaskDialog.InstructionText := aMsg;
  TaskDialog.Content := aInstruction;
  TaskDialog.VerificationText := 'In the future, use this answer and do not ask again.';
  ...

  TaskDialog.Show(
      procedure (ButtonID: integer)
      begin
        Results := ButtonID;
      end;
)
  result := Results;
end;

Is there any way to return the modal result of the TaskDialog to the calling procedure?

No that is unfortunately not possible. The dialog itself is blocking user interaction, but the result is handled asynchronously because modal dialogs do not exist on Android and iOS.