A Task Manager Tutorial
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
7 posts
Page 1 of 1
Level = ★☆☆☆☆
Hello, I hope all of you are having a good day. To begin I wanna say thanks, to everyone on the forum, for showing me how to code better! cooll;
Lets begin now, first create a new project, in this lets name it... Task Manager
On your form, you'll need
Name Button2: TaskKill
Keep listbox1 the same name.
Now, re-decorate your form, anchor stuff were you want it, do whatever.
Now it is time for coding!
Above the public class form1 code paste this:
Time for the next code.
Above 'End CLass' paste this:
![Image]()
Hello, I hope all of you are having a good day. To begin I wanna say thanks, to everyone on the forum, for showing me how to code better! cooll;
Lets begin now, first create a new project, in this lets name it... Task Manager
On your form, you'll need
- 1 list box
2 buttons
Name Button2: TaskKill
Keep listbox1 the same name.
Now, re-decorate your form, anchor stuff were you want it, do whatever.
Now it is time for coding!
Above the public class form1 code paste this:
Code: Select all
In the TaskRefresh_click code:
Imports System.IO
Code: Select all
TaskKill_Click code:
GetProcesses()
Code: Select all
You should have NOTHING but error's but thats okKillProcess()
GetProcesses()
Time for the next code.
Above 'End CLass' paste this:
Code: Select all
Thank you all, have good day/morning/night. Cya next time coder's! Public Sub GetProcesses()
ListBox1.Items.Clear()
Dim p As Process
For Each p In Process.GetProcesses
ListBox1.Items.Add(p.ProcessName)
Next
End Sub
Public Sub KillProcess()
Try
Dim p As Process
For Each p In Process.GetProcesses
If p.ProcessName = ListBox1.SelectedItem Then
p.Kill()
End If
Next
GetProcesses()
MsgBox("You just killed your sected item", vbOKOnly, "Worked")
Catch ex As Exception
MsgBox("Failed to close due to administrator rights!")
End Try
End Sub

Last edited by dradra43 on Sun Dec 05, 2010 8:00 am, edited 3 times in total.
It is easy to do, but the actual code is advancd...
Happy coding
mandai wrote:Advanced how?Its easy for YOU to do, it was advanced for the coding... I was gonna make everyone code it themselves, and thats why i put advanced. But it works just like default task manager. It kills items, and does everything the real one does.
Dradra43, Don't mind Mandai he comes up with these comments.
I think a better term may be do-it-yourself but I understand what he means now.
THANKS! This was my first program! It was very easy to understand! YOU ROCK!
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023