Is there a .NET equivalent to the Windows GetLastInputInfo()
API?
I know it's possible to P/Invoke the API but I'm looking for a method or technique that's already built into the .NET framework.
Is there a .NET equivalent to the Windows GetLastInputInfo()
API?
I know it's possible to P/Invoke the API but I'm looking for a method or technique that's already built into the .NET framework.
There isn't a direct translation of that specific API in the .NET BCL. Fortunately, it's a very easy method to P/Invoke.
That being said, there are other ways to attempt to check user idle state. Most still require P/Invoke at some level (at least all of the ones that handle other applications).
Here is a CodeProject article comparing options.
© 2022 - 2024 — McMap. All rights reserved.