list all running proccess in a textbox
-
Hi all am working on a small project for work part of the proccess is killing a proccess that is hung and i seem to be haveing trouble getting it to work i think i could probably get a better understanding if i knew how to list all the running proccess on a machine at any given time. does anyone know of an example that does this?
-
Hi all am working on a small project for work part of the proccess is killing a proccess that is hung and i seem to be haveing trouble getting it to work i think i could probably get a better understanding if i knew how to list all the running proccess on a machine at any given time. does anyone know of an example that does this?
-
You should look at the Process class. The GetProcesses method http://msdn2.microsoft.com/en-us/library/aa326948(VS.71).aspx[^] Ben
-
System.Diagnostics.Process[] aProcesses = System.Diagnostics.Process.GetProcesses(); foreach (System.Diagnostics.Process p in aProcesses) { textBox2.Text = textBox2.Text + p.ToString() + System.Environment.NewLine; }
-
any elegiant suggestion on how to remove the extra text that is given in the loop the system.diagnositc bla bla (firefox) i want it to just show up as firefox
-
There are a lot of properties in the Process class. So instead of p.ToString() Perhaps you could just do: p.ProcessName Ben