I am working with QTP 11 and an application written in Windows Forms.

I'm trying to find a way to know if the Windows Form app is working or settled into an idle state.

This code was found from a Google search. I don't have the source of the posted code. If I find the link, I will give them credit.

The code was inside of C# code.

Is there a way to call this from QTP.

Also the two articles that mentioned this also said there are better methods to call that are more accurate. I can go back for the details and tune it once I find out how to call this

I was considering creating an external script that keeps writing to a flat file that will contain either "active" or "idle".