home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / cb / setup / cbuilder / data.z / RICHABT.CPP < prev    next >
C/C++ Source or Header  |  1997-02-28  |  1KB  |  32 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //---------------------------------------------------------------------
  6. #include <vcl.h>
  7. #pragma hdrstop
  8.  
  9. #include "RichAbt.h"
  10. //----------------------------------------------------------------------------
  11. #pragma resource "*.dfm"
  12. TForm2 *Form2;
  13. //----------------------------------------------------------------------------
  14. __fastcall TForm2::TForm2(TComponent *Owner)
  15.   : TForm(Owner)
  16. {
  17. }
  18. //----------------------------------------------------------------------------
  19.  void __fastcall TForm2::FormShow(TObject* /*Sender*/)
  20. {
  21.      TMemoryStatus MS;
  22.      MS.dwLength = sizeof(MS);
  23.      GlobalMemoryStatus(&MS);
  24.      PhysMem->Caption = FormatFloat((AnsiString)"#,###' KB'", MS.dwTotalPhys / 1024);
  25.      LPSTR lpMemLoad = new char[5];
  26.      sprintf(lpMemLoad,"%d %%",MS.dwMemoryLoad);
  27.      FreeRes->Caption = (AnsiString)lpMemLoad;
  28.      delete [] lpMemLoad;
  29. }
  30. //----------------------------------------------------------------------------
  31.  
  32.