thank pbadly for the quick response, the reason for me to ask that question is, i want to monitor if the active form and it's controls are in idle mode, because i want to boot out all user's who's using the system without doing anything for two hours so it will free up all the tables that they are using. the code that i have is fine and it is in my timer events, it can monitor if the system is idle for two hours, my delima is the listbox or combobox, the timer is keep on running if there are selections made, it didn't reset the counter (because timer read the same object name).
anyways i found a solution this morning. i declare a public varible (add it to the timer event) and it change the value if the listbox or combobox click event invoke and with this the counter reset to 0.
thanks a lot guys.