Is there a way to check if an application has finished loading.
For example if I were to use Process newProcess = Process.Start(@"C:\someFile.xls");
is there IsLoaded or IsFinishedLoading or something similar to that, so that another line of code does not fire until the application is fully loaded.
I ask because I get an error when trying to interface with an excel sheet because its not open. Using only Process newProcess = Process.Start(@"C:\someFile.xls"); does the job but only after my application has crashed due to no excel document being open.
Now is there a way to speed up the starting of the program/file? Or have I coded something incorrectly.
There is no generic way to know when an application started or finished opening a document.
Some programs (i.e. Office applications) provide API to communicate/control them, while others (i.e. Notepad) have no way to know this information.