Option Explicit
Private Declare Sub GlobalMemoryStatus Lib "kernel32" (lpbuffer As memorystatus
Private Type memorystatus
dwlength As Long
dwmemoryload As Long 'belleğin kullanım yüzdesi
dwtotalphys As Long 'toplam fiziksel bellek kullanımı
dwavailphys As Long 'fiziksel bellekteki boş miktar
dwtotalpagefile As Long
dwavailpagefile As Long
dwtotalvirtual As Long
dwavailvirtual As Long
End Type
Private Sub Form_Load()
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
Cls
Dim m As memorystatus
GlobalMemoryStatus m
FontSize = 15
ForeColor = &HFF&
Print "Bellek kullanımı %:", m.dwmemoryload
ForeColor = &HFF8080
Print "Toplam RAM :", , m.dwtotalphys / 1024 / 1024&; "mb"
ForeColor = &H8080&
Print "Boş RAM :", , m.dwavailphys / 1024 / 1024&; "mb"
End Sub
0 yorum:
Yorum Gönder