Yaz  Font K   lt Yaz  Font B y lt

Delphide Progressbar Kullan m

 

Merhaba arkada lar bu makalemizde delphide progressbar örne i yapaca z.

Formumuza 1 adet Progressbar, 1 adet Label ve Timer ekleyelim.  Timer n Interval de erini 100 yap yoruz.

 

 

Resim1

ekil 1



 

Resim2

ekil2

 

unit prograssbar_Unit1;

interface

uses

Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,

Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.ComCtrls, Vcl.StdCtrls;

type

TForm1 = class(TForm)

ProgressBar1: TProgressBar;

Timer1: TTimer;

Label1: TLabel;

procedure Timer1Timer(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

implementation

{$R *.dfm}

 

procedure TForm1.Timer1Timer(Sender: TObject);

begin

Timer1.Interval:=100;

ProgressBar1.Position:=ProgressBar1.Position+1;

Label1.Caption:=ProgressBar1.Position.ToString + ' % ';

if ProgressBar1.Position=100 then

begin

Timer1.Enabled:=false;

showmessage ('100% oldu...');

end;

end;

end.

 

 

Bir makalenin daha sonuna geldik. Bir sonraki makalede görü mek üzere. Bahad r AH N