I want to show a dialog as modal( i.e. blocks all interaction with all the other ui in my application) But I don't want that call to block execution, how do I do that?
This isn't pretty, but for reasons out of my control, we just have one thread, and can't create more. currently when we do a time consuming progress, we want to show a progress bar, but in order for it to update while the process is progressing, we have to call DoEvents() (eek).
This unsurprisingly causes a few issues sometimes, but if we could easily disable all ui except the progress bar, that might help.
I got this idea from reading this answer here: https://stackoverflow.com/a/5183623/259846
Edit: A modal dialog is simply one that disables all other UI - only the modal dialog can be interacted with. This is separate from whether or not the operation to show this dialog is blocking or not. I don't see any reason why you couldn't in theory have a function that shows a modal dialog box without blocking until the box is closed.
I want to show a progress bar, and I want this progress bar to update as a process progresses, I doesn't matter how I go about doing this, the fact is, that if you want to update one dialog, you have to update the whole UI. As such I want the rest of the UI except for the progress window to be disabled so it can't be interacted with while my process is in progress.
And yes, I can only have one thread, no parallelism.