This question is about keeping the GUI responsive during longer-running tasks (a few seconds in most cases).

I extensively use threads and a task pattern to execute expensive task in a background thread. But what about GUI updates that takes some time? For example, filling a large string grid or tree view? A thread does not help here because everything needs to be synchronized with the main thread anyway.

I know the problems of `Application.ProcessMessages`, but currently it seems like the only solution to put calls to `ProcessMessages` inside the GUI update methods.

Any better ideas?