Compartir a través de


How to: Create 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 the ProcessStartInfo class.

To create an instance of the Process component programmatically

  1. Create an instance of the Process component class in code.

    Dim myProcess As New Process()
    
    Process myProcess = new Process();
    
  2. Call Start to start a new process. For more information, see How to: Specify Processes.

See Also

Tasks

How to: Specify Processes
How to: Stop Processes

Reference

ProcessStartInfo

Concepts

Introduction to Monitoring and Managing Windows Processes