login timeout winforms
Can anyone tell me, how to make a Login timedout functionality in my Winform application. My user is able to login. What I want to do is, if he doesn't touch the application for say 20 min, and then he try to access anything in the application he will have to fill开发者_运维技巧 the password in it first.
Sorry for not providing any code, as I dont have idea where to start. And I believe for Login its simple SQL Query to check the Username and Password. I work in C# and SqlServer 2008.
Thanks in advance.
you can try using System.Timers.Timer
for waiting for 20 min, and then just call the logout method (you should make one - it should null the connection). When he 'touches' the app, just show him the login form or message him that he's not logged in
精彩评论