ListBox

Posts 14 of 4 · Page 1 of 1
ListBox
Hello.
I want all processes that are running on my system in a ListBox.

Can you please tell me the code?
What have you tried already?
Code:
foreach(Process p in Process.GetProcesses())
{
      listBox1.Items.Add(p.ProcessName);
}
If I were you I'd store it in a Dictionary<string, int> to get the ID of each process whenever you want, so you can gain access at it.
Quote Originally Posted by user590177 View Post
Code:
foreach(Process p in Process.GetProcesses())
{
      listBox1.Items.Add(p.ProcessName);
}
If I were you I'd store it in a Dictionary<string, int> to get the ID of each process whenever you want, so you can gain access at it.
Okay thanks dude.
Posts 14 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?