Visual Basic - CPU Usage (NL&EN)

Опубликовано: 18 Июнь 2026
на канале: xMaXiMiZeD
3,444
21

In deze video wordt uitgelegd hoe je een programma in Visual Basic maakt dat het totale CPU gebruik van je computer uitleest.

Lukt het niet? Code (Dit is de totale code, wis de gehele code van je project en plak deze erin):

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Timer1.Enabled = True

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

ProgressBar1.Value = PerformanceCounter1.NextValue.ToString
Label1.Text = "CPU Usage: " + ProgressBar1.Value.ToString + "%"

End Sub
End Class

(English)

This video explains how to make a program in Visual Basic that shows the total CPU usage of your computer.

Having problems? Code (This is the entire code, delete the entire code of your project and paste this one):

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Timer1.Enabled = True

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

ProgressBar1.Value = PerformanceCounter1.NextValue.ToString
Label1.Text = "CPU Usage: " + ProgressBar1.Value.ToString + "%"

End Sub
End Class