/* * * How to Use the Process Component * * * * Add a process component to the form via the toolbox. In the click event, start it and pass in the website you want. * Then start the process. * When the form is closing, close the process if it has not been released from RAM. */ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace Using_the_Process_Control_Demo { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { process1.StartInfo.FileName = "www.yahoo.com"; process1.Start(); } //---this event fire just before form is actually closed. If the Process still exists, then close it. private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (process1 != null) process1.Close(); } } }