Question Listing All Running Processes in ListView

Puddings

New member
Joined
Nov 13, 2010
Messages
4
Programming Experience
Beginner
Hi, I have created a client and server application where the clients will be run on multiple computers while the server application will be run on the host computer in the same network.

So far I am able to list all the connected clients in a ListView on the server application with the IP addresses and computer names of the client computers.

What I am trying to do next is to add a function where it will run a new form with another ListView listing all the running processes of the particular computer when it is selected on the previous ListView.

All I know is System.Diagnostics.Process is used to display all the running processes on a computer, but I have no idea how to put things together and get it to work.

I'm really new with VB .Net and I hope someone will be able to help me with this :eek:
 
Process.GetProcesses will return an array of Process objects representing all the running processes on the specified machine. You can then loop through that array and, for each element, add a ListViewItem to your ListView. You would set the Text of the item to the ProcessID or ProcessName and then add a subitem to the item for each other value you want displayed.

Note that you would set the control's View to Details and then add the appropriate columns in the designer.
 
Back
Top