VB 2008 Tutorial - Advanced 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.
1 post Page 1 of 1
Contributors
User avatar
tvs praveen
Top Poster
Top Poster
Posts: 205
Joined: Tue Dec 08, 2009 6:20 am

Insert 1 ListView, 1 StatusStrip, 1 ToolStripStatusLabel1, 1 PerformanceCounter, 2 Timer 2 Label and 1 Button

In PerformanceCounter1 select Thread into CategoryName


In PerformanceCounter1 select % Processor Time into CounterName

In PerformanceCounter1 select Idle/0 into InstanceName

Change Timer1 Interval into 1000

Make Timer1 Enabled into True

Select Details into View

Make GridLines into True

Add up to 5 columns in ListView1

Change the columns name into the following below

ColumnHeader1 into "Name"

ColumnHeader2 into "Memory"

ColumnHeader3 into "Working"

ColumnHeader4 into "Initialized"

ColumnHeader5 into "ID"

Change Label1 text into "CPU Usage:"

Change Label2 text into "00 %"

Double click Timer1 and add this code into it
Code: Select all
Dim cpuLoad As Integer = CDec(PerformanceCounter1.NextValue.ToString())
cpuLoad = 100 - cpuLoad
Label2.Text = cpuLoad.ToString() & "%"
On Error Resume Next
ProgressBar1.Value = cpuLoad.ToString
Double click Timer2 and add this code into it

Form1_Load(Nothing, Nothing)

Double click and add this code into Button1
Code: Select all
For Each Process As ListViewItem In ListView1.SelectedItems
System.Diagnostics.Process.GetProcessById(Process.SubItems(4).Text).Kill()
Next
Form1_Load(Nothing, Nothing)
Now debug, Your text will scroll too smoother!


*******************Thanks for reading my tutorial, I think this Tutorial will be most helpful to you!*******************

If you want any custom tutorial for you or you need any help in VS.NET, VB.NET, Software Coding, Designing and much more any help in Computer stuffs just ask me

Mostly i will help everyone in coding and design stuffs in on Computer

- Best regards hehaho;

- Tvs Praveen wahooo;

- Thanks CodeNStuff! for this amazing Website cooll;
1 post Page 1 of 1
Return to “Tutorials”