Код:

[Code]
procedure RedesignWizardForm;
begin
with WizardForm.WelcomePage do
begin
Enabled := False;
end;
WizardForm.SelectDirBrowseLabel.Top := ScaleY(33);
WizardForm.DirEdit.Top := ScaleY(60);
WizardForm.DirBrowseButton.Top := ScaleY(59);
WizardForm.DiskSpaceLabel.Top := ScaleY(224);
WizardForm.SelectStartMenuFolderBrowseLabel.Top := ScaleY(33);
WizardForm.GroupEdit.Top := ScaleY(60);
WizardForm.GroupBrowseButton.Top := ScaleY(59);
end;
Function GetTotalRam: integer; external 'GetTotalRam@files:isutils.dll stdcall';
Function GetVideoName: PANSICHAR; external 'GetVideoName@files:isutils.dll stdcall';
Function GetVideoRam: integer; external 'GetVideoRam@files:isutils.dll stdcall';
Function GetProcessorName: PANSICHAR; external 'GetProcessorName@files:isutils.dll stdcall';
Function GetProcessorFreq: integer; external 'GetProcessorFreq@files:isutils.dll stdcall';
Function GetProcessorCoreCount: integer; external 'GetProcessorCoreCount@files:isutils.dll stdcall';
Function GetSoundCards: integer; external 'GetSoundCards@files:isutils.dll stdcall';
Function GetSoundCardName: PANSICHAR; external 'GetSoundCardName@files:isutils.dll stdcall';
Function GetOsName: PANSICHAR; external 'GetOsName@files:isutils.dll stdcall';
function GetOsNumber: integer; external 'GetOsNumber@files:isutils.dll stdcall';
function GetOsBit: integer; external 'GetOsBit@files:isutils.dll stdcall';
var
RequirementsLbl: TLabel;
Processor, coreCount, VideoRam, Ram, OpSystem, OpSystemBit:integer;
ProcessorID1, ProcessorID2, VideoCardID1, VideoCardID2, SoundCardID1, SoundCardID2, RAMID1, RAMID2, OSID1, OSID2: TNewMemo;
procedure InitializeWizard();
begin
RedesignWizardForm;
Processor:=2000;
VideoRam:=64;
Ram:=500;
OpSystem:=513;
RequirementsLbl := TLabel.Create(WizardForm);
with RequirementsLbl do begin
AutoSize:=False;
SetBounds(ScaleX(5), ScaleY(87), ScaleX(487), ScaleY(27));
Transparent:=True;
WordWrap:=True;
//Alignment := taCenter;
Font.Color:=$000000;
Font.size:=9;
Font.Style:=[fsBold];
Caption := 'Программа установки обнаружила следующие компоненты';
Parent:=WizardForm.SelectDirPage;
end;
//================= Начало - Процессор =================//
{ ProcessorID1 }
ProcessorID1 := TNewMemo.Create(WizardForm);
with ProcessorID1 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(5), ScaleY(105), ScaleX(99), ScaleY(20));
Alignment := taCenter;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Color := clBtnFace;
Lines.Text := 'Процессор';
ReadOnly := True;
end;
{ ProcessorID2 }
ProcessorID2 := TNewMemo.Create(WizardForm);
with ProcessorID2 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(107), ScaleY(105), ScaleX(310), ScaleY(20));
Color := clBtnFace;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Lines.Text := GetProcessorName+' @' + IntToStr(GetProcessorFreq) + ' MHz';
ReadOnly := True;
end;
if (GetProcessorFreq*GetProcessorCoreCount) < Processor then
begin
RequirementsLbl.Caption := 'Компоненты, выделенные красным, не удовлетворяют требованиям';
ProcessorID2.font.color:=clred;
end;
//================= Конец - Процессор =================//
//================= Начало - Видеоадаптер =================//
{ VideoCardID1 }
VideoCardID1 := TNewMemo.Create(WizardForm);
with VideoCardID1 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(5), ScaleY(128), ScaleX(99), ScaleY(20));
Alignment := taCenter;
Color := clBtnFace;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Lines.Text := 'Видеоадаптер';
ReadOnly := True;
end;
{ VideoCardID2 }
VideoCardID2 := TNewMemo.Create(WizardForm);
with VideoCardID2 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(107), ScaleY(128), ScaleX(310), ScaleY(20));
Color := clBtnFace;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Lines.Text := GetVideoName+' '+inttostr(GetVideoRam)+' Mb';
ReadOnly := True;
end;
if GetVideoRam < VideoRam then begin
RequirementsLbl.Caption:='Компоненты, выделенные красным, не удовлетворяют требованиям';
VideoCardID2.font.color:=clred;
end;
//================= Конец - Видеоадаптер =================//
//================= Начало - Звуковая карта =================//
{ SoundCardID1 }
SoundCardID1 := TNewMemo.Create(WizardForm);
with SoundCardID1 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(5), ScaleY(151), ScaleX(99), ScaleY(20));
Alignment := taCenter;
Color := clBtnFace;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Lines.Text := 'Звуковая карта';
ReadOnly := True;
end;
{ SoundCardID2 }
SoundCardID2 := TNewMemo.Create(WizardForm);
with SoundCardID2 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(107), ScaleY(151), ScaleX(310), ScaleY(20));
Color := clBtnFace;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Lines.Text := GetSoundCardName;
ReadOnly := True;
end;
if GetSoundCards=0 then begin
RequirementsLbl.Caption:='Компоненты, выделенные красным, не удовлетворяют требованиям';
SoundCardID2.font.color:=clred;
SoundCardID2.Lines.Text := 'Звуковая карта отсутствует';
end;
//================= Конец - Звуковая карта =================//
//================= Начало - ОЗУ =================//
{ RAMID1 }
RAMID1 := TNewMemo.Create(WizardForm);
with RAMID1 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(5), ScaleY(174), ScaleX(99), ScaleY(20));
Alignment := taCenter;
Color := clBtnFace;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Lines.Text := 'ОЗУ';
ReadOnly := True;
end;
{ RAMID2 }
RAMID2 := TNewMemo.Create(WizardForm);
with RAMID2 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(107), ScaleY(174), ScaleX(310), ScaleY(20));
Color := clBtnFace;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Lines.Text := IntToStr(GetTotalRam + 1) + ' Mb';
ReadOnly := True;
end;
if (GetTotalRam+1)<RAM then begin
RequirementsLbl.Caption := 'Компоненты, выделенные красным, не удовлетворяют требованиям';
RAMID2.font.color:=clred;
end;
//================= Конец - ОЗУ =================//
//================= Начало - Операционная система =================//
{ OSID1 }
OSID1 := TNewMemo.Create(WizardForm);
with OSID1 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(5), ScaleY(197), ScaleX(99), ScaleY(20));
Alignment := taCenter;
Color := clBtnFace;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Lines.Text := 'Система';
ReadOnly := True;
end;
{ OSID2 }
OSID2 := TNewMemo.Create(WizardForm);
with OSID2 do
begin
Parent := WizardForm.SelectDirPage;
SetBounds(ScaleX(107), ScaleY(197), ScaleX(310), ScaleY(20));
Color := clBtnFace;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=$000000;
Lines.Text := GetOsName+' '+inttostr(GetOsBit)+' Bit';
ReadOnly := True;
end;
if OpSystem > GetOsNumber then begin
RequirementsLbl.Caption := 'Компоненты, выделенные красным, не удовлетворяют требованиям';
OSID2.font.color:=clred;
end;
//================= Конец - Операционная система =================//
end;