Screen Lock for MFC App
-
Hello All, I have a MFC app thats being developed in VS 6.0 If the app is idle for more than 5 mins it should lock automatically. i.e., the next time when user tries to click anywhere on app, it should ask for user name and password. Is there any good examples for that? The closest example i can think of is the screen saver lock in Windows operating system. Any sample code will help. Thanks in advance.
-
Hello All, I have a MFC app thats being developed in VS 6.0 If the app is idle for more than 5 mins it should lock automatically. i.e., the next time when user tries to click anywhere on app, it should ask for user name and password. Is there any good examples for that? The closest example i can think of is the screen saver lock in Windows operating system. Any sample code will help. Thanks in advance.
Have a look at this article HOWTO track a user's idle time[^]; it seems to have a good implementation on how to detect the idle time. When the idle time (five minutes) has been reached you could show a modal dialog that requires the user to specify his/her user name and password.
0100000101101110011001000111001011101001
-
Have a look at this article HOWTO track a user's idle time[^]; it seems to have a good implementation on how to detect the idle time. When the idle time (five minutes) has been reached you could show a modal dialog that requires the user to specify his/her user name and password.
0100000101101110011001000111001011101001
Wow, That is a really old article... and the code is essentially implementing a system-wide window hook. That code would actually fail on Vista+ operating system unless modified to use attachthreadinput and executed from an administrative account. :) Best Wishes, -David Delaune
-
Hello All, I have a MFC app thats being developed in VS 6.0 If the app is idle for more than 5 mins it should lock automatically. i.e., the next time when user tries to click anywhere on app, it should ask for user name and password. Is there any good examples for that? The closest example i can think of is the screen saver lock in Windows operating system. Any sample code will help. Thanks in advance.