unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ColorProgressBar, StdCtrls;

type
  TForm1 = class(TForm)
    ColorProgressBar1: TColorProgressBar;
    ColorProgressBar2: TColorProgressBar;
    ScrollBar1: TScrollBar;
    procedure ScrollBar1Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ScrollBar1Change(Sender: TObject);
begin
Caption:=IntToStr(ScrollBar1.Position);
if ScrollBar1.Position<=50 then
  begin
  ColorProgressBar1.Position:=ScrollBar1.Position;
  ColorProgressBar2.Position:=0;
  end
  else
  begin
  ColorProgressBar1.Position:=50;
  ColorProgressBar2.Position:=ScrollBar1.Position;
  end;
end;

end.
