title: Show a modal dialog while running a long UI operation on Main thread
body: <p>I want to display a modal dialog with a progress bar while doing some work on the main UI Thread. Without using any multi-threading technique my UI would for sure be in a hanging state. </p>
  
  <p>How do I achieve this while running the computationally intensive long operation on the main thread (as it involves UI elements and I shudder to touch this legacy code), while displaying the status of the computation on the wait window (which shall run on a different thread)</p>
  
  <p>I need to run a progress dialog window on a different thread while keeping the main thread occupied to compute the long bound operation involving main UI form elements. </p>
  
  <p>Thanks for some pointers</p>