I've inherited a Winforms application that does a lot of long running calls into the application server from the UI thread, so the UI stays unresponsive, unusable, unclosable for quite some time. (Which makes me really go AAAAAAAAARGH!)
I plan to move the server calls to a background thread and have the UI disabled - but movable & closable - while the background thread does its work.
So what would be the best way to inhibit user input to my application? I'm thinking along the lines of "modal progress dialog", but I'd prefer a solution that does not force me to throw visuals into the face of the user (some server operations run within less than 500ms so a dialog is not optimal ...)
Is there any way in Winforms to prevent the user from launching actions or changing data in the application while letting through a few select things (resize, show, hide and family and the user closing the window)? I'd prefer a way that does not make me access every UI element in my forms and set it to disabled ... there are quite a lot of them and that application really has a "hacked in the UI designer until it shows flashy things" style of source code. No way of refactoring EVERY smelly thing until release date ...
Oh, by the way, this App lives in .net framework 2
See Question&Answers more detail:os