Is there a way to get a notice when there is a window which has just been load and going to be created (e.g. after clicking a button) within other thread or process? I want to use it in Automation for some UI rather than using Start-Sleep for specific seconds/minutes and even not sure that if the loading is fail!
I tried SetWinEventsHook and SetWindowsHookEx API but boh does not work and seems only can run in a Form Class.
I also tried receiving WMI message and succeed to get notice when the process is fully run but not "window being created’.
FindWindow and EnumWindows are also not working because those API can only find the window when it is client-ready but not "window being created’.