Thread: Monitoring processes

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    129

    Monitoring processes

    I am currently writing a program that keeps an eye on processes running in windows. The program uses the handles of the processes to move them around, resize etc. The problem I am having is keeping track of the processes and gaining 'access' to them quickly without a Process.GetProcess() and then having to look through that array to find the one I want. Does anyone have any pointers to make this less cumbersome?
    He who asks is a fool for five minutes, but he who does not ask remains a fool forever.

    The fool wonders, the wise man asks. - Benjamin Disraeli

    There are no foolish questions and no man becomes a fool until he has stopped asking questions. Charles Steinmetz

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Perhaps you're looking for:
    Code:
    System.Diagnostics.Process.GetProcessById(Id);
    System.Diagnostics.Process.GetProcessesByName(Name);
    ?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 34
    Last Post: 05-27-2009, 12:26 PM
  2. Task Manager: Applications vs Processes
    By Shwick in forum Windows Programming
    Replies: 3
    Last Post: 08-14-2008, 06:47 AM
  3. Processes not dying
    By Elkvis in forum Linux Programming
    Replies: 12
    Last Post: 04-23-2008, 08:59 AM
  4. binary tree of processes
    By gregulator in forum C Programming
    Replies: 1
    Last Post: 02-28-2005, 12:59 AM
  5. creating n monitoring 5 processes (notepad)
    By nishzone in forum Windows Programming
    Replies: 3
    Last Post: 08-24-2003, 09:03 PM