我正在使用递归计算文件夹空间,因此我想显示“忙"对话 [英] I'm using Recursion to calculate folder space so I want to show "Busy" Dialog

查看:75
本文介绍了我正在使用递归计算文件夹空间,因此我想显示“忙"对话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示忙碌"对话框,而函数计算文件夹空间并在此之后隐藏忙碌"对话框.请引导我.

I want to show Busy dialog while function calculates the folder space and hide Busy dialog after that. Please guide me.

推荐答案

请参阅我对问题的评论.两个字:不好的主意.对话框的目的非常不同.充其量,您会让用户疯狂.更糟糕的是,如果您确实使用了一个线程,则该应用程序看起来会挂起,尤其是当有人激活某个其他应用程序的窗口然后尝试激活您的应用程序时.您实际上应该在单独的线程中执行任何耗时的操作.

—SA
Please see my comment to the question. Two words: bad idea. And the purpose of the dialog is very different. At best, you would drive your users crazy. Worse, if you really use one thread, the application would look hanging, especially if someone would activate a window of some other application and then try to activate yours. You should really do any time-taking operation in a separate thread.

—SA


这篇关于我正在使用递归计算文件夹空间,因此我想显示“忙"对话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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