独立的孩子形式 [英] independent child forms
本文介绍了独立的孩子形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在c#中为每个子窗体创建独立的光照过程.
实际上,我要创建的应用程序包含多个子窗体,如果一个子窗体需要花费更多的时间来处理文件,则整个应用程序会自动提交.
请帮助我解决这个问题..
how to create independent light process for each child form in c#.
Actually, the application that I ma creating contains multiple child forms and If one child form takes more time in processing a file then the whole application hands up..
please help me to get ride of this issue..
推荐答案
我假设您正在UI线程上执行此耗时的操作.
看看 BackgroundWorker [
I assume you''re executing this time consuming operation on the UI thread.
Have a look at the BackgroundWorker[^] class.
Delegate the work to a background thread and show the user some notification that work is being done at the moment.
This way the application won''t hang.
这篇关于独立的孩子形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文