Hi,
I developed a payroll software and i want if any body login to the payroll system
and they leave application ideal then after some time it will log off the user automatically
thanks
Printable View
Hi,
I developed a payroll software and i want if any body login to the payroll system
and they leave application ideal then after some time it will log off the user automatically
thanks
Use a timer and the mouse move over the application...
Something like, if there isn't any movement over the application GUI, start the timer, if mouse move, restart the timer, if not just put a limit to make the application logoff.
this is used in every forms or in main menu form
It depends of your application, if you have a mdi container form you only need in the main form, if you have several forms, you need to detect the move in every one..
Just use a global var with the limit of inactivity time, use a class to start and check the timer, in the mouse move in the form(s), just put something to start the timer. In the class just have a function that checks in every tick if the limit its reached...