I have a program that runs a pretty long operation in the background once a user clicks the button. I have implemented a progress bar but if the window is touched or moved then it grays out and says (Not repsonding). Everything still works and when the operation finishes the program resumes function. (But a user would not know this 🙁
Any ideas on the best way to keep this from happeneing
I working with vb.net in Visual Studio 2010
Moving your processing out of the main UI thread into a background worker thread is the best solution, but a short term fix just to get the window responding might be to use Application.DoEvents in an appropriate place in your processing code.
But be warned that it can create some re-entrancy problems if the user can still perform actions on your form.