home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
RICHABT.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
1KB
|
32 lines
//----------------------------------------------------------------------------
//Borland C++Builder
//Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
//----------------------------------------------------------------------------
//---------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "RichAbt.h"
//----------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm2 *Form2;
//----------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent *Owner)
: TForm(Owner)
{
}
//----------------------------------------------------------------------------
void __fastcall TForm2::FormShow(TObject* /*Sender*/)
{
TMemoryStatus MS;
MS.dwLength = sizeof(MS);
GlobalMemoryStatus(&MS);
PhysMem->Caption = FormatFloat((AnsiString)"#,###' KB'", MS.dwTotalPhys / 1024);
LPSTR lpMemLoad = new char[5];
sprintf(lpMemLoad,"%d %%",MS.dwMemoryLoad);
FreeRes->Caption = (AnsiString)lpMemLoad;
delete [] lpMemLoad;
}
//----------------------------------------------------------------------------