Quote:
Originally Posted by BLACKFIRE69
how about this way? i think it's more convenient.
Code:
procedure _GetMeRAMInGB;
var
MyRamInGB: Integer;
begin
// Note: ARamUsage.TotalRam --> Total RAM in MB.
MyRamInGB := Round(ARamUsage.TotalRam / 1024); // 0, 1, 2, 3, ....
case MyRamInGB of
0..2:
begin
MsgBox('RAM: 0..2 GB', mbInformation, MB_OK);
end;
3..4:
begin
MsgBox('RAM: 3..4 GB', mbInformation, MB_OK);
end;
// ....
else
begin
MsgBox('Are you sure you really have RAM installed? ;)', mbError, MB_OK);
end;
end;
end;
|
It's more convenient, yes. I did this because I thought that it could only be done through the MbOrTb function and asked about it in the FMX Q&A topic, but I never got an answer, so I did and already released a repack on the torrent tracker, the main thing is that it works.
I was not afraid to make it on FMX and release it, I even worked on supporting 32-bit machines.