View Single Post
Old June 9th, 2009   #27 (permalink)
S.T.A.R.S.
 
S.T.A.R.S.'s Avatar
 
Join Date: Jan 2006
Location: Planet Earth...
Posts: 593
Hey I have a question.I made that when the button is clicked,that the list box control displays ALL the current active processes.My code works,but there is one problem for which I need help.The list box DOES NOT display the extension for ANY of the processes like ".exe",".bat",".dll" and so on...
How can I display the extension for the processes?
Here is the code I used:

privatevoid button1_Click(object sender, System.EventArgs e)
{
listBox1.Items.Clear();
Process[] procs=Process.GetProcesses(Environment.MachineName );
foreach(Process process in procs)
{
listBox1.Items.Add(process.ProcessName.ToString()) ;
}
}

__________________
GOODBYE FOREVER EVERYONE...

Last edited by S.T.A.R.S.; June 9th, 2009 at 19:31..
S.T.A.R.S. is offline   Reply With Quote