void __fastcall TForm1::FormCreate(TObject *Sender)
{
MEMORYSTATUS memory;
memory.dwLength = sizeof (memory);
GlobalMemoryStatus (&memory);
Label1->Caption = FloatToStr(memory.dwTotalPhys / 1024)+ " Kb RAM total";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
MEMORYSTATUS memory;
memory.dwLength = sizeof (memory);
GlobalMemoryStatus (&memory);
ProgressBar1->Position = (float) memory.dwMemoryLoad;
Label2->Caption = String ((int) (memory.dwMemoryLoad ))+ "% Memoria en uso";
}
//---------------------------------------------------------------------------