Comments
Join Hawkee
|
Login
Search
in
Code Snippets
Products
Reviews
Forum
Home
Platforms
Cold Fusion
CSS
Javascript
mIRC
mySQL
.NET
OpenSocial
Perl
PHP
Python
Ruby / Rails
TCL
Snippets
Cold Fusion (1)
CSS (2)
Javascript (7)
mIRC (3,747)
mySQL (1)
.NET (6)
OpenSocial (1)
Perl (8)
PHP (132)
Python (1)
Ruby / Rails (6)
TCL (20)
Products
Computers (11,610)
Electronics (7,973)
Software (1,146)
Video Games (3,947)
Reviews
Computers (6,438)
Electronics (16,676)
Software (2,372)
Video Games (7,206)
Comments
Images
Scripts
Code Snippets
Products
Reviews
Profiles
Forum
username
password
auto login
Home
>
Code Snippets
>
KuTsuM's Snippets
>
.NET
Kill a Process
Please
Register
to submit score.
Average Score
0.0
Scores Submitted
0
Date Added
Sep 26, 2007
Last Updated
Sep 26, 2007
Tags
kill
process
processes
Introduction
This snippet will kill a current running process in VB.NET. To load snippet go File>New Project>Console Application
Grab the Code
Module procKill Sub main() System.Console.Writeline("What process would you like to kill (IE: notepad)") Dim kProc = System.Console.Readline() Dim pList() As System.Diagnostics.Process = _ System.Diagnostics.Process.GetProcessesByName(kProc) For Each proc As System.Diagnostics.Process In pList Dim resp As MsgBoxResult resp = MsgBox("Terminate " & proc.ProcessName & "?", _ MsgBoxStyle.YesNo, "Terminate?") If resp = MsgBoxResult.Yes Then proc.Kill() End If Next End Sub End Module
Comments
(0)
RSS
Go to Bottom
Enter comment here..
Please
Register
or
Login
to start posting comments.
KuTsuM
Marketing Manager
Minneapolis, Minnesota
Last seen:
Dec 05, 2007
Profile
Snippets
(12)
Images
(1)
Comments Received
(43)
Comments Submitted
(139)
Forum Posts
(906)
My Snippet Tags
add
calculator
chatspace
connected
connection
crypter
detector
directories
directory
folder
internet
kill
list
mp3
network
outwar
process
processes
proxy
regex
remove
scan
scanner
Contact
Add to Friends
Send Private Message
AOL AIM:
Lsass1sYn
Sponsors