I have an application that launches a process using Process.Start
. The process will either show up the actual window after a few seconds (depending on how much time it took to load), or will show a MessageBox
with an error message.
After I'm using Process.Start
, I want my application to wait until either the window showed up or the MessageBox
showed up. I tried using WaitForInputIdle
and checking if Handle
is 0, but they both don't work.
How can I wait until the process emits an actual window?