进度栏问题 [英] Problem with Progressbar

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

问题描述

大家好,我对Progressbar有疑问.
我创建了一个函数,它运行缓慢:〜30s.
程序正在处理功能时如何显示进度栏
我该怎么办?
请帮忙!

Hi everyone , I have a problem with Progressbar .
I created a function and it runs slow : ~30s .
How to show up progressbar when the program is processing function
How can i do that ?
Pls help !

推荐答案

进度条不会帮助您加速功能;当执行一些冗长的操作时,它也不会帮助您保持UI响应.您需要在单独的线程中运行耗时的方法.进一步的细节(包括使用进度条)取决于您尚未与我们共享的应用程序类型或UI库.

—SA
A progress bar won''t help you to accelerate your function; it won''t also help you to keep your UI responsive when some lengthy operation is being performed. You need to run your time-taking method in a separate thread. Further detail, including using of a progress bar, depends on the application type or a UI library which you did not bother to share with us yet.

—SA


取决于您拥有的项目类型,您可能希望使用BackgroundWorker [代码项目文章 [本文 [
Depending upon what kind of project you have, you might want to research using a BackgroundWorker[^]. You can find a number of Code Project Articles[^] to help you get started using one. This article[^] looks like a good place to start. Hope this helps.


这篇关于进度栏问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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