Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB.NET ile CPU Performans Grafiği Yapmak
#1
Rainbow 
VB.NET ile CPU Performans Grafiği Yapmak

Merhaba arkadaşlar;

Bu dersimizde CPU yüzde değerini grafiksel olarak işlemeyi öğreneceğiz.

Forma bir PictureBox ekliyoruz.

Genişlik : 420 px
Yükseklik : 150 px
Ve 1 Adet Timer Ekliyoruz

Interval = 1000 veya (daha detaylı izlemek için bu değeri düşürebilirsiniz, 10 gibi)
Enabled = True

Kodlarımız:

Code:
Dim dgn As New System.Diagnostics.PerformanceCounter("Processor", "% Processor Time", "_total")

Dim g As Graphics = PictureBox1.CreateGraphichs()
Dim p As New Pen(Brushes.Black)
Dim son As New Point(0, 140)
Dim zaman As Integer = 0

Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As Syste.EventArgs)
If zaman < 400 Then zaman +=1 Else zaman=0:g.Clear(Color.White):son.X=0:son.Y=140
Dim basla As New Point(son.X, son.Y)
son.X = zaman
son.Y = dgn.NextValue()
g.DrawLine(p, basla, son)
End Sub
[Image: vmpt.gif]
·٠•●♥ Ƹ̵̡Ӝ̵̨̄Ʒ ♥●•٠·˙˜”*°•. || Türk Team - SaNcArHaN71 || .•°*”˜˙·٠•●♥ Ƹ̵̡Ӝ̵̨̄Ʒ ♥●•٠·˙
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping