CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    44

    killing a process on my pc

    I wrote a GUI that displays running processes on my PC. I can select the process ID from the GUI but I cant figure out how to kill it.

    Any one know the command to do so in C#.

    There is a kill command but it takes no argument. Say I have 2 WORD applications running and I got 2 IDs, I want to be able to kill one and not the other.

    Thanks very much

  2. #2
    Join Date
    Jul 2003
    Posts
    101
    Process.GetProcessById(1308).Kill();
    Reality is the illusion created by lack of alcohol

  3. #3
    Join Date
    Nov 2003
    Posts
    44
    Acephalus

    Thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured