© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies

  HomeSource Code DotNet ► C# ▼

Windows Application Running Process

Windows application which shows all the processes running, which can also be viewed in windows task manager by pressing shortcut key "CTRL+ALT+DEL.

 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace runningprocess
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.LB_Processes.Items.Clear();

            Process[] all_process = Process.GetProcesses();

            foreach (Process x in all_process)
            {

                this.LB_Processes.Items.Add(x.ProcessName + " \t");

                this.TB_All_Processes.Text = Convert.ToString(this.LB_Processes.Items.Count);

            }

        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}

 

SLogix Student Projects
bottom