简体   繁体   中英

Log off application if the user is not active

We have a requirement that if the user does not perform any operation with mouse or keyboard on the application for a specific time period, the active user needs to be logged of from the application. The application has more than 40 screens

Is there any built in functionality .net support for handling this type of requirement? What is the best way for handling the requirement?

You may use GetLastInputInfo using PInvoke. Also you may see the article How to check for user inactivity with and without platform invokes in C#

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM