How to: List Processes (Visual Basic)
Visual Studio 2005
This example produces a list of running application processes. This information can be used when calling the AppActivate function.
Example
Dim pList() As System.Diagnostics.Process = _ System.Diagnostics.Process.GetProcesses For Each proc As System.Diagnostics.Process In pList MsgBox(proc.ProcessName) Next
Compiling the Code
This example requires:
-
An Imports statement specifying the System.Diagnostics namespace. For more information, see Imports Statement.