home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
RICHABT.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
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;
}
//----------------------------------------------------------------------------