在空闲时间激活登录表单 [英] activating login form in idle times

查看:85
本文介绍了在空闲时间激活登录表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我有一个不同用户使用的应用程序.此应用程序具有登录表格.
在很多情况下,用户会运行该应用程序,但是在应用程序运行时,用户可能会花几分钟进行操作.
我的问题是,如果用户闲置10分钟并使用该应用程序,如何再次激活登录表单.
谢谢alot

解决方案

0)设置一个全局datetime变量,该变量在用户每次执行某项操作(在应用程序中单击鼠标或按下键时)都会更新

1)创建一个线程(每隔几秒钟)将当前时间与变量中保存的时间进行比较,如果它们的变化时间超过N分钟,请注销用户并显示登录表单.


hi i have an application that diffrent users use it. this application has login form.
in many times the user runs to the application but while the application is running the user maybe dosent work with it for several minutes.
my question is that how the login form can be activate again if the user be idle for 10 minutes and dosent work with the application.
thanks alot

解决方案

0) Setup a global datetime variable that is updated every time the user does something (any mouse click or key press in the app)

1) Create a thread that (every couple of seconds) compares the current time with the time saved in the variable, and if they vary by more than N minutes, log the user off and display the logon form.


这篇关于在空闲时间激活登录表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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