进度条不显示进度的结果? [英] progress bar is not showing progress results?

查看:206
本文介绍了进度条不显示进度的结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用进度条工作正常,但进度条blank..it不显示工作的进展有什么不好?

i have used progress bar in my application..my application is working fine but the progress bar is blank..it does not show the working progress what is wrong??

推荐答案

也许你正在执行的工作,在主界面线程。这将导致所有GUI事件被延迟,直到任务完成。

Probably you are performing the work in the main GUI thread. This causes all GUI events to be delayed until the task is finished.

使用一个 BackgroundWorker的代替,并使用其<一个href="http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.progresschanged.aspx"相对=nofollow> ProgressChanged 事件来更新进度条。

Use a BackgroundWorker instead and use its ProgressChanged event to update the progress bar.

还记得设置<一个href="http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.workerreportsprogress.aspx"相对=nofollow> WorkerReportsProgress 以在你的后台工作。

Also remember to set WorkerReportsProgress to true on your background worker.

这篇关于进度条不显示进度的结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆