home *** CD-ROM | disk | FTP | other *** search
/ Delphi Anthology / aDELPHI.iso / Runimage / Delphi50 / Demos / Richedit / reabout.pas < prev    next >
Pascal/Delphi Source File  |  1999-08-11  |  812b  |  44 lines

  1. unit Reabout;
  2.  
  3. interface
  4.  
  5. uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
  6.   Buttons, ExtCtrls, SysUtils;
  7.  
  8. type
  9.   TAboutBox = class(TForm)
  10.     OKButton: TButton;
  11.     ProgramIcon: TImage;
  12.     Label1: TLabel;
  13.     Bevel1: TBevel;
  14.     Label2: TLabel;
  15.     Label3: TLabel;
  16.     PhysMem: TLabel;
  17.     Label4: TLabel;
  18.     FreeRes: TLabel;
  19.     procedure FormCreate(Sender: TObject);
  20.   private
  21.     { Private declarations }
  22.   public
  23.     { Public declarations }
  24.   end;
  25.  
  26. var
  27.   AboutBox: TAboutBox;
  28.  
  29. implementation
  30.  
  31. {$R *.DFM}
  32.  
  33. procedure TAboutBox.FormCreate(Sender: TObject);
  34. var
  35.   MS: TMemoryStatus;
  36. begin
  37.   GlobalMemoryStatus(MS);
  38.   PhysMem.Caption := FormatFloat('#,###" KB"', MS.dwTotalPhys / 1024);
  39.   FreeRes.Caption := Format('%d %%', [MS.dwMemoryLoad]);
  40. end;
  41.  
  42. end.
  43.  
  44.