unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
ProgressBar1: TProgressBar;
procedure Button1Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
i : Integer;
begin
ProgressBar1.Position := 0;
ProgressBar1.Min := 1;
ProgressBar1.Max := 100000;
SendMessage(ProgressBar1.Handle, $0409, 0, clGreen);
for i := ProgressBar1.Min to ProgressBar1.Max do
begin
ProgressBar1.StepBy(1);
end;
PostMessage(ProgressBar1.Handle, $0409, 0, clNavy);
end;
end.