Display progress bar while doing some work in C#?

后端 未结 13 1811
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-27 12:07

I want to display a progress bar while doing some work, but that would hang the UI and the progress bar won\'t update.

I have a WinForm ProgressForm with a Pro

相关标签:
13条回答
  • 2020-11-27 13:13

    For me the easiest way is definitely to use a BackgroundWorker, which is specifically designed for this kind of task. The ProgressChanged event is perfectly fitted to update a progress bar, without worrying about cross-thread calls

    0 讨论(0)
提交回复
热议问题