Show Your Memory


‘add 4 Labels and 1 progressbarr and 1 timer

‘Label1 ->Caption:Memory:

‘Label2 ->Autosize:True

‘Label3 ->Caption:Use

‘Label4 ->Autosize:True

‘Progressbar1 ->Scrolling:1 -ccScrollingSmooth

‘Timer1 ->Interval:100

‘and here code

Private Declare Sub GlobalMemoryStatus lib “KERNEL32” (lpBuffer as MEMORYSTATUS)

Dim mem MEMORYSTATUS

Private Type MEMORYSTATUS

dwlength as Long

dwMemoryLoad as Long

dwTotalPhys as Long

dwAvailPhys as Long

dwTotalPageFile as Long

dwAvailPageFile as Long

dwTotalVirtual as Long

dwAvailVirtual as Long

End Type

Private sub form_Load()

GlobalMemoryStatus Mem

Label2.Caption=Format (Mem.dwTotalPhys / 1048576, “standard”) & “Mb”

Label4.Caption=Mem.dwMemoryLoad & “%”

ProgressBar1.Value=Mem.dwMemoryLoad

End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s