Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
var
memory: TMemoryStatus;
begin
memory.dwLength := SizeOf(memory);
GlobalMemoryStatus(memory);
Label10.caption:=FloatToStr(RoundTo((memory.dwTotalPhys/1024),-2)) + ' KB';
Label11.caption:=FloatToStr(RoundTo((memory.dwAvailPhys/1024),-2)) + ' KB';
end;
Desweiteren muss die
Unit 'Math' eingebunden werden.