unit Progress;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, StdCtrls;
type
TFmProgress = class(TForm)
Animate1: TAnimate;
Label1: TLabel;
Label2: TLabel;
ProgressBar1: TProgressBar;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
procedure SetNowPos(strtheWhatDo:AnsiString);
procedure InitProgress(itheMax:integer;strtheCaption:AnsiString );
{ Public declarations }
end;
var
FmProgress: TFmProgress;
implementation
{$R *.DFM}
procedure TFmProgress.SetNowPos(strtheWhatDo:AnsiString);
begin
ProgressBar1.Position:=ProgressBar1.Position+1;
Label1.Caption:=strtheWhatDo;
Application.ProcessMessages;
end;
procedure TFmProgress.InitProgress(itheMax:integer;strtheCaption:AnsiString );
begin
self.Caption:=strtheCaption;
ProgressBar1.Max:=itheMax;
ProgressBar1.Min:=0;
ProgressBar1.Position:=0;
end;
procedure TFmProgress.FormCreate(Sender: TObject);
begin
Animate1.FileName:=extractfilepath('Findfile.avi')+'Findfile.avi';
Animate1.Active:=true;
end;
end.