Take a look at c-sharp-detect-time-of-last-user-interaction-with-the-os which uses GetLastInputInfo functionand also SystemParametersInfo function retrieving SPI_GETSCREENSAVETIMEOUT.
How to get the time left from a Windows Session before the active user is locked out of a session?
![](https://techprofile.blob.core.windows.net/images/3P7xyeu_H0e09oGu2ElNOQ.png?8D9244)
Antonio Arocha
21
Reputation points
Hello:
I would like to know, how much time is left before a user is locked out of it's current windows session in c#.