如何运行一种表单5秒钟然后关闭它? [英] Hhow to run one form for 5 seconds and then close it?

查看:86
本文介绍了如何运行一种表单5秒钟然后关闭它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何运行一种表单5秒钟然后关闭它?
谢谢

Hi,
How to run one form for 5 seconds and then close it?
Thanks

推荐答案

尝试使用以下形式的Timer控件.

处理计时器的Tick事件并关闭表单.

我假设您正在谈论WinForms
Try using a Timer control in the form.

Handle the Timer''s Tick event and close the form.

And I assume you are talking about WinForms


This[^] should help you.

It will give you a shove in the right direction.


使用multhreading会花一些时间,而您只需要手动关闭表格即可. 通过使用Application.exit();方法
use multhreading give some time and you only mannually close the form
by using Application.exit(); method


这篇关于如何运行一种表单5秒钟然后关闭它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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