Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


[VB.Net]Kill a process filter_list
Author
Message
[VB.Net]Kill a process #1
Function:
Code:
''' <summary>
''' Kills a process which is selected.
''' </summary>
''' <param name="ProcessName">The process you want killed.</param>
''' <remarks></remarks>

    Public Function KillProcess(ByRef ProcessName As String)
        Dim RunningProcess As System.Diagnostics.Process = Process.GetProcessesByName(ProcessName)(0)
        RunningProcess.Kill()
        Return RunningProcess
    End Function




Usage:

Code:
KillProcess("explorer")
KillProcess("notepad")


I thought i share cause this is a snippet that should be close to your hand every time you want to use it.

Credits go to VBForums
Pierce the life fibers with your drill.

Reply

RE: [VB.Net]Kill a process #2
thanks for this post buddy Smile ..this is seriously useful..btw the ' ' ' are they single lined comments?

Reply

RE: [VB.Net]Kill a process #3
np Smile

well, in intellisense or the VS compiler it will show as tips.
(This post was last modified: 03-26-2011, 05:43 PM by Skullmeat.)
Pierce the life fibers with your drill.

Reply

RE: [VB.Net]Kill a process #4
ooooo ok Smile thanks for telling me...

Reply

RE: [VB.Net]Kill a process #5
Dud! i really want to learn this more! can you make a video tutorial for this? :thumbs:
Once upon a time
Spoiler:
ONE.....
Spoiler:
TWO.....
Spoiler:
THREE!!!!!!
[Image: R1bYlfT.gif]
RUN MIO-CHAN!!!

Reply

RE: [VB.Net]Kill a process #6
well... i don't get it. a video? this is simple. just copy paste the function to the code of your designer, then double click the form in the designer and type:
Code:
killprocess("yourprocesswithoutextension")

thats all!
Pierce the life fibers with your drill.

Reply

RE: [VB.Net]Kill a process #7
my designer??! what is that? a softwear ?? i really new and noob about this :p
Once upon a time
Spoiler:
ONE.....
Spoiler:
TWO.....
Spoiler:
THREE!!!!!!
[Image: R1bYlfT.gif]
RUN MIO-CHAN!!!

Reply

RE: [VB.Net]Kill a process #8
i mean Visual Studio designer.
Pierce the life fibers with your drill.

Reply

RE: [VB.Net]Kill a process #9
do it same with Microsoft Visual Studio?
Once upon a time
Spoiler:
ONE.....
Spoiler:
TWO.....
Spoiler:
THREE!!!!!!
[Image: R1bYlfT.gif]
RUN MIO-CHAN!!!

Reply

RE: [VB.Net]Kill a process #10
it can be kill such thing like avira and other AV's ?

Reply







Users browsing this thread: 2 Guest(s)