I need to display a window of type "Wait". Close the window when the action is finished. Unfortunately, I don't know in advance how long the action will take.
I have tried your AdvDialog, but it stops executing the code after displaying it. So I don't see an option to close it programmatically.
Is there any chance?

TAdvTaskDialog is indeed a blocking dialog unless you perform the action in a separate thread from the UI thread in which TAdvTaskDialog runs.

Is TAdvTaskDialog multi-thread safe, ie. can I use TThread.CreateAnonymousThread(<Procedure to show Dialog>).Start to display it from the main thread but in a background thread?

Or did you mean that the background thread should be the action to be executed (in which case, how does the background thread close the TAdvTaskDialog)?

TAdvTaskDialog is using VCL UI and VCL UI should run in the UI thread. It is better to move the action to be executed running in a separate thread.

I don't use fibers. I don't know anything about them. I prefer to create my own form. That's how I know how to deal with it.