Originally posted by: BradAtWork
System.Diagnostics.Process.StartTime
So
foreach(System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses())
{
Console.WriteLine(p.StartTime);
}
I do VB.Net not C#, but that should work.
This really wont do what the OP is asking - it just returns the time the process was started, not how long they took to start. Although, maybe it could help him a bit.
I agree with Tencntraze, there is not specific event or callback to know when something is done loading. The only thing i can think of is using FindWindow to see when the programs main window opens (assuming it has one), and compare that to the process start time. But this wont work for many/most program - it's hit or miss.
There are alot of other factors, like what is included in the startup time - for example, i have my MSN to auto login, is the startup done AFTER it logs in, or before? For antivirus, it updates its definitiions everyday - is it before it updates or after? There are a lot of factors to consider. I wish i had a better answer for the OP, but i' dont.