I want to programmatically verify the status of an application to see if it has crashed or stopped. I know how to see if the process exists in C# but can I also see if it is "Not responding"?
A:
See "Not Responding" Message in Windows Form Applicati at Fog Creek Software
boost
2008-11-26 13:14:21
+6
A:
Everything you need is in System.Diagnostics, for example: to check if a process is responding.
using System;
using System.Diagnostics;
namespace ProcessStatus
{
class Program
{
static void Main(string[] args)
{
Process[] processes = Process.GetProcesses();
foreach (Process process in processes)
{
Console.WriteLine("Process Name: {0}, Responding: {1}", process.ProcessName, process.Responding);
}
Console.Write("press enter");
Console.ReadLine();
}
}
}
Student for Life
2008-11-26 13:20:10