Click here to Skip to main content
15,887,875 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have made an application which has log-in screen. When the user logs in with authorised password, he lands on the working screen, Now what i would like to do is, 1> If the user is not doing anything on the working screen(view in mfc) then the application should auto-log off after specified period of time. (SO HOW CAN I CHECK IF THE USER IS NOT ACTIVE ON THE WORKING SCREEN) 2> And if user is not active i want to go to login screen again.

What i first thought is i should close the application then relaunch the application that will take the user to the login screen, but if i close the application then i want be able to relaunch the application. So what probably can solve my requirement here. Thanks in advance.
Posted
Comments
Philippe Mori 25-Nov-13 19:55pm    
The solution dépends a lot on how you want to handle specific case like when the application is not active and what kind of use that should prevent the application to become inactive.

Have a look at GetLastInputInfo function[^].
 
Share this answer
 
You may take a look into this Article for a Self-Restartable Application. That will may helps on your approach for closing and reopening the application .
 
Share this answer
 
Comments
Philippe Mori 25-Nov-13 19:52pm    
I would not go as far as that for something like that.

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