This article is useful for people who want to kill an irritating process using VB.NET. By the way I am using VB.NET 2010.
I know that most people try
Formx_load but that kills the program only for once. It can be restarted if Windows allows it. Using this code maybe you will
be able to kill an annoying program.
Therefore we use a timer.
Why a Timer?
We are using a timer because the event
Formx_load occurs only once but the event
Timerx_Tick occurs every second
or millisecond. Therefore it kills the program many times until Windows fails to restart it. Remember that this is for experimental purposes only.
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As DevComponents.DotNetBar.ClickEventArgs)
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
For Each prog As Process In Process.GetProcesses
If prog.ProcessName = "ProcessName" Then
You cant paste it into your form....
Points of Interest
I was trying to kill a virus which used to run at startup and kill Windows Explorer.
I tried to disable it from msconfig but again and again it prompted up and then I found this method!!!
- Article posted: 15/12/2012 6:30 PM.
I am a guy who loves to program(in hobby time).
I plan to pursue a career in Programming.
My Programming Experiences are :
VB (Liked it a LOT)
ASM (AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH!!! Somebody save me)
Compilers I use :
MingW (It's really a good one if you want a free Version of GCC on Windows)
DJGPP (Okay, but not as good as MingW)
GCC (On Ubuntu)
Reading Comics (Captain America was the best one)
Solving Calculus (Sometimes tough though)
Playing Football (and watching too)
Favorite Word : LOL
Favorite Programming Language : C++