Hi..
I am creating a desktop application in visual studio 2005 using c# with sql server 2000.
In my application every user logs in with his own id and password.
my question is that. I want to logout user automatically if user is not active since 5 minuts.
How it is possible.
Thanks
Loading
Kanhialal kkPosted Aug 2, 2014, 11:48 AM
I will really thankful to you.
Leon PuthPosted Jul 29, 2014, 4:53 AM
I suggest using a base class from which all forms inherit. this base class has a static timestamp (static so its shared amongst all instances of the base class, thus all open forms) and a static timer which checks occasionally if that timestamp is older than 5 minutes. if it is, it logs out the user or closes the application. You can then update this timestamp on mouse move event or key event.