unit Unit3;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, ComCtrls, StdCtrls;
type
TForm3 = class(TForm)
ProgressBar1: TProgressBar;
Timer1: TTimer;
Button1: TButton;
StatusBar1: TStatusBar;
procedure FormCreate(Sender: TObject);
procedure StatusBar1DrawPanel(StatusBar: TStatusBar;
Panel: TStatusPanel; const Rect: TRect);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
{$R *.DFM}
procedure TForm3.FormCreate(Sender: TObject);
begin
statusbar1.Panels[0].style:=psOwnerDraw;
progressbar1.Parent:=statusbar1;
end;
procedure TForm3.StatusBar1DrawPanel(StatusBar: TStatusBar;
Panel: TStatusPanel; const Rect: TRect);
begin
progressbar1.BoundsRect:=rect;
end;
procedure TForm3.Timer1Timer(Sender: TObject);
begin
progressbar1.Position:=progressbar1.Position+10;
end;
end.