This code will display the CPU and RAM usage using two progressbars.
You will need:
Configuration
click performancecounter 1: categoryname - processor & countername - processortime
click performancecounter 2: categoryname - memory & countername - commited by bytes
Press F5 to start debugging.
Image for my application: http://romaniachat.ro/images/slider/slider2.jpg
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
ProgressBar1.Value = PerformanceCounter1.NextValue
ProgressBar2.Value = PerformanceCounter2.NextValue
End Sub
End Class