var
PB2 : TImgPB2;
br : TButton;
IsClosed:Boolean;
procedure brClick(Sender:TObject);
var
i,j: Integer;
begin
for i := 1 to 5 do begin
for j := 1 to 100 do begin
ImgPBSetPosition2(PB2,j);
ImgApplyChanges(WizardForm.Handle);
Application.ProcessMessages;
if IsClosed then
break;
end;
end;
ImgPBSetPosition2(PB2,0);
ImgApplyChanges(WizardForm.Handle);
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
ImgPBDelete2(PB2);
ImgApplyChanges(WizardForm.Handle);
end;
function InitializeSetup:boolean;
begin
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
Result:=True;
end;
procedure InitializeWizard;
begin
IsClosed:=False;
with WizardForm do begin
InnerNotebook.Hide;
OuterNotebook.Hide;
Bevel.Hide;
end;
ImgLoad(WizardForm.Handle,'nfs.jpg',0,0,WizardForm.ClientWidth,WizardForm.ClientHeight,True,True);
PB2:=ImgPBCreate2(WizardForm.Handle,'{#pbbkg}','{#pb}',10,200,WizardForm.ClientWidth-20,22,8,8,4);
ImgApplyChanges(WizardForm.Handle);
br:=TButton.Create(WizardForm);
with br do begin
Parent:=WizardForm;
SetBounds(10,170,100,21);
Caption:='Loop';
OnClick:=@brClick;
end;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm := False;
Cancel := ExitSetupMsgBox;
if Cancel then
IsClosed:=True;
end;
procedure DeinitializeSetup;
begin
gdipShutdown;
end;