Possible Duplicate:
Detecting idle users in Winforms
I am working with a desktop application and i want to lock the application if the it is idle from a specific time, if there is any event fired then the expiry time should be reset. When the application locked then user have to again enter username and password if he want to login again in the application.
Right now I am working with timer control to handle this functionality but i don't know the right place to write the code for reset the expiry time.
Pleas tell me how i can do that job...