How to get the time left from a Windows Session before the active user is locked out of a session?

Antonio Arocha 21 Reputation points
2021-05-31T15:05:50.643+00:00

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#.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,015 questions
{count} votes

Accepted answer
  1. RLWA32 45,701 Reputation points
    2021-06-01T23:27:04.177+00:00

    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.