Is there a .NET equivalent to the Windows GetLastInputInfo() API? I know it's possible to pinvoke the API but I'm looking for a method or technique that's already built into the .NET framework.
A:
If there isn't another call for this Pinvoke.net provides a P/Invoke solution for this call and necessary struct.
Timothy Carter
2009-07-01 15:47:28
+1
A:
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.
Reed Copsey
2009-07-01 15:51:30