I want to use a progressbar while a lengthy calculation is in progress. Now, I want to place it in a small form consisting only of the progressbar, a title, a label and a cancel button. The form must be modal and self-closing when done.

My question is, do I have to place the calculating code in this form (or call it from it)?