holas..me podrias eplicar esta parte "{ Variable global actualizada por el procedimiento que realiza el trabajo. }
PasoActual: INTEGER;" ...aqui te muestro mi procedimiento y ala vez este proc llama a otro proc y ese proc a otro proc :..
este es el codigo que llama al progreesbar..cuando esta en el next de Welcome se deberia ejecutar el progreesbar y a la vez el procedimiento que demora en ejecutar
Código Delphi
[-]
function NextButtonClick(CurPageID: Integer): Boolean;
var
ResultCode: Integer;
MyProgChecked: Boolean;
MyProg: Boolean;
MyProg2: Boolean;
MyProgtexto: String;
resultadomsg: Boolean;
I: Integer;
begin
MyProg :=True;
case CurPageID of
wpSelectDir:
begin
MyProgChecked :=DirExists(WizardDirValue);
if MyProgChecked then
begin
resultadomsg :=MsgBox('Folder:' #13#13 ' ''' + WizardDirValue + ''' ' #13#13 'There, you want to install it anyway?', mbConfirmation, MB_YESNO) = idYes;
if resultadomsg = False then
begin
MyProg := False;
end;
end;
end;
wpWelcome:
begin
CreateTheWizardPages;
ProgressPage := CreateOutputProgressPage('My App','');
ProgressPage.SetText('Starting installation...', '');
ProgressPage.SetProgress(0, 0);
ProgressPage.Show;
try
for I := 0 to 10 do begin
ProgressPage.SetProgress(I, 10);
Sleep(100);
end;
finally
ProgressPage.Hide;
end;
end;
end; Result := MyProg;
end;
este el codigo del procedimiento CreateTheWizardPages y este llama a otro proc llamado BuscarArchivos
Código Delphi
[-]
procedure CreateTheWizardPages;
var
Edit: TNewEdit;
listado: TStrings;
inicio: Integer;
scale : Integer;
scale1:Integer;
j:Integer;
n: integer;
DataDir: String;
begin
listado := TStringList.Create;
Page := CreateCustomPage(wpWelcome, 'List of files in the system',
'Want to remove any previous versions?, If you want to remove any previous version Callcenter, please select an item.');
Buttona := TNewButton.Create(Page);
Buttona.Width := ScaleX(240);
Buttona.Height := ScaleY(23);
Buttona.Caption := 'Uninstall the selected path';
Buttona.Parent := Page.Surface;
Buttona.Visible := true;
Buttona.OnClick := @ButtonOnClicka;
BuscarArchivos(ExpandConstant('{pf}'+ '\'), 'CallCenter.exe', listado);
scale :=8;
CheckListBox1 := TNewCheckListBox.Create(Page);
j :=5;
scale :=scale+ (j+15);
CheckListBox1 := TNewCheckListBox.Create(Page); CheckListBox1.Top := Buttona.Top + Buttona.Height + ScaleY(scale);
CheckListBox1.Width := 410;
CheckListBox1.Height :=180;
CheckListBox1.Parent := Page.Surface;
for inicio := 0 to listado.Count - 1 do
begin
CheckListBox1.AddCheckBox(listado[inicio], 'Path', 0, False, True, True, True, nil);
end;
listado.Free;
end;
Por favor me podria explicar como el numero de pasos..gracias por sus respuestas
