下载状态为100%时如何关闭表格? [英] How to close the form when download status is 100%?

查看:81
本文介绍了下载状态为100%时如何关闭表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在表单加载中,我正在运行一个进程(正在下载一些文件)
下载状态完成后,我想关闭表格..

还有
启动过程启动后,下载过程窗口对我不可见.
如何使下载窗口显示为可见?(在taskmanager中,我能够看到进程处于运行模式,例如exa:downloadfile.exe)

任何想法...

Hi
in form load i am running a process(Downloading some file)
I want to close the form when download status is completed..

and also
download process window is not visible to me when the process is started.
how to make the download window as visible?(In taskmanager i am able to see the process is in running mode exa: downloadfile.exe)

any idea...

推荐答案

听起来像是您已在主UI线程中运行所有用于下载的代码,这就是为什么下载窗口不显示.

因此,您需要做的是将要下载的代码移到其自己的线程中,这将允许主UI线程更新显示.
What it sounds like is that you have all the code for the downloading running in your main UI thread, this would be why the download window does not display.

So what you need to do is move the code for the downloading in to its own thread which will allow the main UI thread to update the display.


这篇关于下载状态为100%时如何关闭表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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