Üye Kayıt Üye Giriş

Görev Yöneticisi


Görev Yöneticisi

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.Win32;
using System.IO;
using System.Diagnostics;
using System.Resources;

namespace Process_Manager
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Process myProcess = new Process();
//Declare process
txtMachine.Text = System.Environment.MachineName.ToString();
//set the machine name to textbox
}

private void FillList(string MachineName)
{
Process[] Prc;
ListViewItem lvwP;

Cursor.Current = Cursors.WaitCursor;
//Set cusrsor as wait

try
{
lvwProcesses.Items.Clear();
Prc = Process.GetProcesses(MachineName.ToString());

foreach (Process Prcs in Prc)
{
lvwP = lvwProcesses.Items.Add(Prcs.ProcessName.ToUpper());
if (MachineName != System.Environment.MachineName)
{
lvwP.SubItems.Add("Unavailable...");
lvwP.SubItems.Add("Unavailable...");
lvwP.SubItems.Add(Prcs.Id.ToString());
}
else
{
lvwP.SubItems.Add(Prcs.MainWindowTitle);
lvwP.SubItems.Add(Prcs.Responding.ToString());
lvwP.SubItems.Add(Prcs.Id.ToString());
}
}
}
catch
{
lvwProcesses.Items.Add("Error enumerating items...");
}

Cursor.Current = Cursors.Default;
}

private void Form1_Load(object sender, EventArgs e)
{
FillList(txtMachine.Text);
}

private void cmdRefresh_Click(object sender, EventArgs e)
{
FillList(txtMachine.Text);
}
}
}

Bilgisayar Dershanesi Ders Sahibi;
Bilgisayar Dershanesi

Yorumlar

Yorum Yapabilmek İçin Üye Girişi Yapmanız Gerekmektedir.

ETİKETLER