PDA

Просмотр полной версии : Создаем свой ProgressBar В Lazarus,Delphi


RenatPro
06.12.2014, 13:20
YZoWMn0p8tc

var
Form1: TForm1;
i:integer;
implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Timer1Timer(Sender: TObject);
begin
image2.Width := i;
Label1.Caption := Floattostr(round(i*100/242))+'%';
inc(i);
if i=242 then
timer1.Enabled := false;
end;

procedure TForm1.FormShow(Sender: TObject);
begin
i:= 0;
end;