Private Sub ShowStatistics()
Dim mem As MEMORYSTATUS
Dim txt As String
GlobalMemoryStatus mem
With mem
txt = txt & "% used: " & _
Format$(.dwMemoryLoad, "@@@@@@@@@@@") & vbCrLf
txt = txt & "Total physical memory: " & _
Format$(.dwTotalPhys, "@@@@@@@@@@@") & vbCrLf
txt = txt & "Physical memory free: " & _
Format$(.dwAvailPhys, "@@@@@@@@@@@") & vbCrLf
txt = txt & "Total page file size: " & _
Format$(.dwTotalPageFile, "@@@@@@@@@@@") & _
vbCrLf
txt = txt & "Free page file size: " & _
Format$(.dwAvailPageFile, "@@@@@@@@@@@") & _
vbCrLf
txt = txt & "Total virtual memory: " & _
Format$(.dwTotalVirtual, "@@@@@@@@@@@") & vbCrLf
txt = txt & "Free virtual memory: " & _
Format$(.dwAvailVirtual, "@@@@@@@@@@@") & vbCrLf
End With
Label1.Caption = txt
End Sub
|