[Tutorial] How to make a task manager
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.
2 posts
Page 1 of 1
Credits go to my friend bombsaway707 for showing me how to.
First add A status strip, then add a Toolstripstatuslabel1 and for its text put "processes: 0"
Then add a list view. Under the listview properties go to view then select details.
Then under listview properties go to Gridlines and select true
Now go to columns and add 5 columns they should look like this in this order
![Image]()
After thats done double click the form and put:
Now add a timer and under the timer put:
His Final Result:
![Image]()
He didn't tell me the code for the refresh, but I figured it out.
First add A status strip, then add a Toolstripstatuslabel1 and for its text put "processes: 0"
Then add a list view. Under the listview properties go to view then select details.
Then under listview properties go to Gridlines and select true
Now go to columns and add 5 columns they should look like this in this order

After thats done double click the form and put:
Code: Select all
After that is done add in a button. Double click the button and put:
Dim Process As New Process()
Dim Count As Integer = 0
ListView1.Items.Clear()
For Each Process In Process.GetProcesses(My.Computer.Name)
On Error Resume Next
ListView1.Items.Add(Process.ProcessName)
ListView1.Items(Count).SubItems.Add(FormatNumber(Math.Round(Process.PrivateMemorySize64 / 1024), 0))
ListView1.Items(Count).SubItems.Add(Process.Responding)
ListView1.Items(Count).SubItems.Add(Process.StartTime.ToString.Trim)
ListView1.Items(Count).SubItems.Add(Process.Id)
Count += 1
Next
ToolStripStatusLabel1.Text = "Processes: " & ListView1.Items.Count
Code: Select all
^make the button text "Kill Process"^For Each Process As ListViewItem In ListView1.SelectedItems
System.Diagnostics.Process.GetProcessById(Process.SubItems(4).Text).Kill()
Next
Form1_Load(Nothing, Nothing)
Now add a timer and under the timer put:
Code: Select all
Now debug and it should work.Form1_Load(Nothing, Nothing)
His Final Result:

He didn't tell me the code for the refresh, but I figured it out.
Code: Select all
ListView1.Refresh()
Please move this to my creation tutorials (vb.net)please because this is not source but a tutorial
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023