Saturday, November 25, 2017

DELPHI - How get total physical memory and memory in use

LPhysMem: TLabel;
LMemoryInUse: TLabel;
MS : TMemoryStatus;
...
GlobalMemoryStatus( MS );
LPhysMem.Caption := FormatFloat( '#,###" KB"', MS.dwTotalPhys / 1024 );
LMemoryInUse.Caption := Format( '%d %%', [ MS.dwMemoryLoad ] );

It shows for example:



No comments:

Post a Comment