How to: List Processes (Visual Basic)
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

How to: List Processes (Visual Basic) 

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:

See Also

Show:
© 2016 Microsoft