This documentation is archived and is not being maintained.

Creating Process Components

You create instances of the Process component to act as a connection between your application and the processes on a computer. Once you bind a Process component instance to an individual process, you can use it to stop or retrieve information about the target process. You can use these methods to create applications that monitor and maintain individual processes or perform actions on a group of processes.

To create an instance of the Process component from the Toolbox

  1. Drag the Process component from the Components tab of the Toolbox to the project.

    The component will reside in the component tray of the designer, located at the bottom of the design surface, and will not be visible to the end user.

  2. Right-click the component and select Properties from the shortcut menu.
  3. Expand the StartInfo section of the component's property page and set any of the starting properties you require. For more information, see ProcessStartInfo Members.

To create an instance of the Process component programmatically

  1. Create an instance of the Process component class in code.
    ' Visual Basic
    Dim myProcess as New Process()
    // C#
    using System.Diagnostics;
    Process myProcess = new Process();
  2. Call Start to start a new process. For more information, see Starting Processes.

See Also

ProcessStartInfo Members | Starting Processes | Stopping Processes | Introduction to Monitoring and Managing Windows Processes