G'day all

Can you give me some code or ideas how to detect if my app has not been activated (eg no command buttons clicked etc) for a determined period of time?

Thanks