一段时间后调用表格 [英] Calling a form after some amount of time
本文介绍了一段时间后调用表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的Application
中,我有两个Form
,并且使用了BackgroundWorker
.第一个Form
以 WorkerCompleted event
结尾,在完成该event
后,我想在5秒钟后打开第二个Form
.我该怎么办?
在此先感谢
In my Application
I have two Form
s and I have used a BackgroundWorker
. The first Form
ends with WorkerCompleted event
, upon finishing of that event
, after 5 seconds I want to open the second Form
. How will I do that?
Thanks in advance
推荐答案
最快的方法是在处理程序中启动一个Timer,该计时器检测第一个窗体何时关闭.设置间隔为五秒,然后在计时器的滴答处理程序中,停止/处置计时器,然后启动第二个表格.
The fastest way is to start a Timer in the handler that detects when the 1st form has been closed. Set the interval for five seconds, and in the tick handler for the timer, stop/dispose the timer, and start the 2nd form.
这篇关于一段时间后调用表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文