I do not think I understand your question. Why would you want to know when ONLY YOUR APPLICATION was idle? If you are polling API functions then by definition your program will not only not be idle, it will be very active. If it is active then it will not be idle. I might suggest testing your application with a Timer Control if you want to know what your application is doing.
OR
You could create a second application to test the condition of an application, but if you use the second application to open and close other applications you need to be VERY careful. It is best in general to avoid this type of application.
LOL
Hunter