TaskDialog.Show is in the background


I use ShowModal to show a form and when the user clicks on a button this code:

    procedure(ButtonID: Integer)
          case ButtonID of

The problem is that the TaskDialog appears under the window.
What can I do?

Thank you!

Try setting the property AdvTaskDialog.ModalParent to the handle of the dialog that is active when you display the TaskDialog.

Hi Bruno,

Thank you for the answer.
For me, TTMSFMXTaskDialog doesn't have a member named ModalParent :-(

Would you be so kind to give a code snippet, how you mean it?

Thank you!

Sorry, I overlooked this was the FMX forum and the use of  name 'TaskDialog' in the subject instead of TTMSFMXTaskDialog confused me.

On FMX, the dialog is shown in relationship to the parent of TTMSFMXTaskDialog. So, make sure TTMSFMXTaskDialog.Parent is set to the form over which you want to display the dialog.

Hi Bruno,

Thank you for the answer, it works well!