一段时间后重定向到另一个表单 [英] Redirect to another form after some time

查看:76
本文介绍了一段时间后重定向到另一个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



如果页面在Windows应用程序中非常理想,请告诉我如何在一段时间后从一个窗体重定向到另一个窗体。



谢谢

解决方案

请参考下文,了解如何检测用户的空闲时间

< a href =http://forum.codecall.net/topic/69801-user-idle-detection/> http://forum.codecall.net/topic/69801-user-idle-detection/ [ ^ ]

使用C#获取用户空闲时间 [< a href =http://www.codeproject.com/Articles/13384/Getting-the-user-idle-time-with-Ctarget =_ blanktitle =New Window> ^ ]

您可以使用计时器并检查每个计时事件中的空闲时间,如果用户空闲时间超过给定时间,则可以关闭或隐藏主表单并打开另一个表单。 / blockquote>

使用Timer UserControl并使用Tick事件触发form2.Show()和this.form.Hide()等方法


Hi all

Please tell me how to redirect from one windows form to another after some time if the page is ideal in windows application.

Thank you

解决方案

refer below for how you can detect idle time of user
http://forum.codecall.net/topic/69801-user-idle-detection/[^]
Getting the user idle time with C#[^]
you can use timer and check the idle time in each tick event and if the user is idle for more than given time then you can close or hide your main form and open another form.


Use Timer UserControl and use Tick event to trigger method such as form2.Show() and this.form.Hide()


这篇关于一段时间后重定向到另一个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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