unit Main;

interface

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

type
  TForm2 = class(TForm)
    Panel1: TPanel;
    BitBtn1: TBitBtn;
    Shape1: TShape;
    btnKOLOR: TBitBtn;
    ColorDialog1: TColorDialog;
    procedure btnKOLORClick(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.BitBtn1Click(Sender: TObject);
begin
	Close();
end;

procedure TForm2.btnKOLORClick(Sender: TObject);
var
   kolor : TColor;

begin
   if ColorDialog1.Execute() then
   begin
      kolor := ColorDialog1.Color;
      Shape1.Brush.Color := kolor;
   end;
end;

end.
