Click here to Skip to main content
15,886,560 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

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.
 
Share this answer
 
v2
Comments
Espen Harlinn 6-Sep-11 18:31pm    
Nice solution :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900