.NET Framework: Process Viewer

This sample uses various classes in System.Diagnostics to gather running process information. 

Featured Highlights

This Windows Form application uses three list view controls on the main form to show all the processes running on the current machine. Once a process is selected, the supporting list view controls will list additional process data as well as data about the Win32 threads in the process. Note that the thread data shown is gathered via the ThreadInfo class not the System.Threading.Thread class. In addition, a secondary child form can be shown detailing the modules (DLLs) loaded by the process including the name of the file where the code was loaded.

Note that there are three processes that don't supply complete information:

Clicking on these items will result in clearing of the list views and/or disallowing opening of the Module Detail child form. Note also that when running the program certain process details may not be available for cetain running programs.

The form uses docking with splitter & panel controls to achieve the desired effect for easy resizing. In addition, there is code to deal with synchronization of data between the three list views. In addition a context menu is used.

Requirements

Requires the Trial or Release version of Visual Studio .NET Professional (or greater).

Running the Sample

Press F5 to start the application. The list of current processes will be loaded automatically. Click on a process to have its details and thread data loaded. Press Ctrl+V or use the menus to view the list of modules loaded by a particular process. Press F5 while the program is running to refresh the list of the processes.

Last Update: 17 July 2002