Winforms – How to make windows form UI responsive


This is a common problem for all developers, I am looking for the best solution to make windows forms UI responsive.

I have an animated GIF file to show progress of my calcuation on windows form. I took a picture box control and placed animated gif into that. now when my calcuation starts – the animaged gif freezes. I want the reverse, the animation should be visible when i am running the calculation.

Any to the point thoughts? A simple solution is to display a progress bar to the user while doing complex calculations behind the scene

My app is a single threaded application, and I want a simple solution, not looking for multi-threads, or background worker kind of technologies.

Any help?

Best Solution

Multiple threads would be my recommendation. A bit messy first time you try ;)

Simplest model: One thread for the GUI, and one thread for whatever work you need to do.

Check this link.