Курсовая работа: Мониторинг ОС
begin
//Выход
Application.Terminate;
end;
procedure TForm1.Image9Click(Sender: TObject);
var
Reg:TRegistry;
begin
Form1.Visible:=False;
FormCPUSpeed.Visible:=True;
Reg:=TRegistry.Create;
Reg.RootKey:=HKEY_LOCAL_MACHINE;
Reg.OpenKey('\Hardware\DESCRIPTION\System\CentralProcessor\0',False);
FormCPUSpeed.LabelCPUName.Caption:=Reg.ReadString('ProcessorNameString');
Reg.CloseKey;
FormCPUSpeed.BitBtnStart.Click;
end;
procedure TForm1.Image2Click(Sender: TObject);
var
MemInfo : TMemoryStatus;
begin
MemInfo.dwLength := Sizeof (MemInfo);
GlobalMemoryStatus (MemInfo);
FormPamyt.PolnayaFizPamyt.Caption:=IntToStr(MemInfo.dwTotalPhys div 1024);
FormPamyt.DostupnayaFizPamyat.Caption:=IntToStr(MemInfo.dwAvailPhys div 1024);
FormPamyt.ObshayaPodkachka.Caption:=IntToStr(MemInfo.dwTotalPageFile div 1024);
FormPamyt.DostupPodkachka.Caption:=IntToStr(MemInfo.dwAvailPageFile div 1024);
FormPamyt.Pamyt1.Progress := MemInfo.dwAvailPhys div (MemInfo.dwTotalPhys div 100);
FormPamyt.Pamyt2.Progress := MemInfo.dwAvailPageFile div (MemInfo.dwTotalPageFile div 100);