View Single Post
  #15  
Old 08-02-2024, 01:58
Tihiy_Don Tihiy_Don is offline
Registered User
 
Join Date: Mar 2023
Location: Los Angeles Lakers
Posts: 43
Thanks: 91
Thanked 26 Times in 18 Posts
Tihiy_Don is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
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.

Last edited by Tihiy_Don; 08-02-2024 at 02:05.
Reply With Quote
The Following 2 Users Say Thank You to Tihiy_Don For This Useful Post:
ADMIRAL (10-02-2024), BLACKFIRE69 (08-02-2024)