home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / progs / CB / DATA.Z / RICHABT.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-05  |  923 b   |  27 lines

  1. //---------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "RichAbt.h"
  6. //----------------------------------------------------------------------------
  7. #pragma resource "*.dfm"
  8. TForm2 *Form2;
  9. //----------------------------------------------------------------------------
  10. __fastcall TForm2::TForm2(TComponent *Owner)
  11.   : TForm(Owner)
  12. {
  13. }
  14. //----------------------------------------------------------------------------
  15.  void __fastcall TForm2::FormShow(TObject* /*Sender*/)
  16. {
  17.      TMemoryStatus MS;
  18.      GlobalMemoryStatus(MS);
  19.      PhysMem->Caption = FormatFloat((String)"#,###' KB'", MS.dwTotalPhys / 1024);
  20.      LPSTR lpMemLoad = new char[5];
  21.      sprintf(lpMemLoad,"%d %%",MS.dwMemoryLoad);
  22.      FreeRes->Caption = (String)lpMemLoad;
  23.      delete [] lpMemLoad;
  24. }
  25. //----------------------------------------------------------------------------
  26.  
  27.