TAdvTaskDialog Progressbar howto?

I just played around with the progressbar functionality of TAdvTaskDialog, but did not get it to work.

I want to display the dialog with the progressbar, while I send and/or receive Emails.
The problem is, that I could not find out, how to display the dialog and udate the progressbar while the email is beeing sent.
Is there any sample code, that shows how to use the taskdialog with progressbar?

The sample in the Tips seciton on the TMS Website is useless, because it only shows how the progressbar is updated in the OnDialogProgress event. It's good for displaying a progressbar just for displaying it and not for showing the progress of any action. Nice, but does not make any sense.

Is there a simple way to do it without using threads?

It is the OnDialogProgress event that should be used to update the progress bar. This event is triggered at regular intervals. There is not an alternative way (because this wraps Microsoft Windows APIs that only expose progressbar updating this way)

Ok, thank you for the answer. I allready feared, that this is the only option. So it is useless for me. Not your fault though.

So I have to make my own progress dialog.

What about a TAdvTaskDialog method which automatically executes the dialog in a separate thread?

AdvTaskDialog.ExecuteThreaded could then update the progressbar in a Synchronize event from the main thread. This would be very useful.

Not sure how that would make a big difference. 
The recommended solution is to put the progress status in some form global vars and read these vars from the OnDialogProgress event and have the progress bar updated this way.

The difference is that by executing the task dialog in the main thread, it returns only after the task dialog has been closed. This is a disadvantage when the global variable you mention is updated e.g. in a loop which cannot be executed because the execute function of the task dialog has not yet returned. By executing the task dialog in a parallel thread, the global variable can be updated in the main thread and its value can be picked up in a Synchronize event handler of the parallel thread.

Ok, that makes sense. We've added it on the feature request list.

Thank you! Your support is fantastic. You're the best!