Programmatically, how does this application detect that a program is ready for input

前端 未结 3 814
清歌不尽
清歌不尽 2021-01-20 22:51

I need to build a small C# application which measures start up times for a definable application. I have found this free tool:

http://www.passmark.com/products/appti

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-20 22:56

    You can call

    WaitForInputIdle( ProcessInfo.hProcess, INFINITE );
    

    Waits until the specified process has finished processing its initial input and is waiting for user input with no input pending, or until the time-out interval has elapsed.

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms687022(v=vs.85).aspx

    http://www.codeproject.com/Articles/137/Sending-a-message-to-the-Main-Frame-Window-of-Anot

提交回复
热议问题