Problem with "no activity", Lafor, is that someone might not even use the mouse at all as keyboard could be used to navigate. So, having said that, you may need to implement some flags Set/Reset logic not only when user moves mouse (GetCursorPos api can be utilzed) but for every input field (textbox, combo, listboxes, etc) on your form as well. And this may become very hairy.