I have a small program in VB5 that launches another program. I have included the following code to end the program once the other application has started:
RetVal = Shell("c:\otherprogram.exe", 1)
window_name = "otherprogram"
Running = Format$(FindWindow(class_name, window_name))
Loop While Running = 0
My problem is, the application I am trying to launch is quite large and takes a lot of time to load. My application finds the window name before the program has actually started causing it to end pre-maturely and showing any existing windows beneath. Is there a way to make sure my application does not end until the program it is launching is fully loaded?