我如何使用Backgroudworker在C#中进行一个没有For循环的长时间运行进程 [英] How I Do Progressbar Using Backgroudworker In C# For One Long Running Process Without For Loop
本文介绍了我如何使用Backgroudworker在C#中进行一个没有For循环的长时间运行进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我希望c#win form进度条与后台工作人员进行长时间运行而无需循环
i进行大量搜索但有些人说如果一个漫长的过程无法发送更新的报告进度
所以可以通过任何其他方式或解决方案
谢谢
Hello,
I want c# win form progress bar with background worker for long running process without for loop
i do lots of searches but some says if one long process can't send updated report progress
so can any other way or solution
Thanks
推荐答案
您需要学习BackgroundWorker提供的基本功能。如果您了解BackgroundWorker的'ProgressChanged事件如何工作,您将意识到您不需要for循环。
CodeProject是您的朋友:
BackgroundWorker和ProgressBar演示[ ^ ]
自定义ProgressBar控件[ ^ ]
Microsoft关于BackgroundWorker的文档包含一个示例在计算Fibonacci系列时使用它与ProgressBar:[ ^ ]
You need to study the basic facilities provided by the BackgroundWorker. If you understand how the BackgroundWorker's 'ProgressChanged Event works, you will realize you do not need a for-loop.
CodeProject is your friend:
"BackgroundWorker and ProgressBar demo" [^]
"Custom ProgressBar Control" [^]
Microsoft's documentation on BackgroundWorker includes an example of using it with a ProgressBar in the calculation of the Fibonacci series: [^]
这篇关于我如何使用Backgroudworker在C#中进行一个没有For循环的长时间运行进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文