unit WinForm;

interface

uses
  System.Drawing, System.Collections, System.ComponentModel,
  System.Windows.Forms, System.Data;

type
  TWinForm = class(System.Windows.Forms.Form)
  {$REGION 'Designer Managed Code'}
  strict private
    /// <summary>
    /// Required designer variable.
    /// </summary>
    Components: System.ComponentModel.Container;
    Panel1: System.Windows.Forms.Panel;
    HScrollBar1: System.Windows.Forms.HScrollBar;
    HScrollBar2: System.Windows.Forms.HScrollBar;
    HScrollBar3: System.Windows.Forms.HScrollBar;
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    procedure InitializeComponent;
    procedure HScrollBar1_Scroll(sender: System.Object; e: System.Windows.Forms.ScrollEventArgs);
  {$ENDREGION}
  strict protected
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    procedure Dispose(Disposing: Boolean); override;
  private
    { Private Declarations }
  public
    constructor Create;
  end;

  [assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]

implementation

{$AUTOBOX ON}

{$REGION 'Windows Form Designer generated code'}
/// <summary>
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure TWinForm.InitializeComponent;
begin
  Self.Panel1 := System.Windows.Forms.Panel.Create;
  Self.HScrollBar1 := System.Windows.Forms.HScrollBar.Create;
  Self.HScrollBar2 := System.Windows.Forms.HScrollBar.Create;
  Self.HScrollBar3 := System.Windows.Forms.HScrollBar.Create;
  Self.SuspendLayout;
  // 
  // Panel1
  // 
  Self.Panel1.Location := System.Drawing.Point.Create(8, 8);
  Self.Panel1.Name := 'Panel1';
  Self.Panel1.Size := System.Drawing.Size.Create(272, 152);
  Self.Panel1.TabIndex := 0;
  // 
  // HScrollBar1
  // 
  Self.HScrollBar1.Location := System.Drawing.Point.Create(8, 176);
  Self.HScrollBar1.Maximum := 255;
  Self.HScrollBar1.Name := 'HScrollBar1';
  Self.HScrollBar1.Size := System.Drawing.Size.Create(272, 16);
  Self.HScrollBar1.TabIndex := 1;
  Include(Self.HScrollBar1.Scroll, Self.HScrollBar1_Scroll);
  // 
  // HScrollBar2
  // 
  Self.HScrollBar2.Location := System.Drawing.Point.Create(8, 208);
  Self.HScrollBar2.Maximum := 255;
  Self.HScrollBar2.Name := 'HScrollBar2';
  Self.HScrollBar2.Size := System.Drawing.Size.Create(272, 16);
  Self.HScrollBar2.TabIndex := 2;
  Include(Self.HScrollBar2.Scroll, Self.HScrollBar1_Scroll);
  // 
  // HScrollBar3
  // 
  Self.HScrollBar3.Location := System.Drawing.Point.Create(8, 240);
  Self.HScrollBar3.Maximum := 255;
  Self.HScrollBar3.Name := 'HScrollBar3';
  Self.HScrollBar3.Size := System.Drawing.Size.Create(272, 16);
  Self.HScrollBar3.TabIndex := 3;
  Include(Self.HScrollBar3.Scroll, Self.HScrollBar1_Scroll);
  // 
  // TWinForm
  // 
  Self.AutoScale := False;
  Self.AutoScaleBaseSize := System.Drawing.Size.Create(6, 15);
  Self.ClientSize := System.Drawing.Size.Create(292, 267);
  Self.Controls.Add(Self.HScrollBar3);
  Self.Controls.Add(Self.HScrollBar2);
  Self.Controls.Add(Self.HScrollBar1);
  Self.Controls.Add(Self.Panel1);
  Self.Name := 'TWinForm';
  Self.Text := 'Kolory (Windows Forms)';
  Self.ResumeLayout(False);
end;
{$ENDREGION}

procedure TWinForm.Dispose(Disposing: Boolean);
begin
  if Disposing then
  begin
    if Components <> nil then
      Components.Dispose();
  end;
  inherited Dispose(Disposing);
end;

constructor TWinForm.Create;
begin
  inherited Create;
  //
  // Required for Windows Form Designer support
  //
  InitializeComponent;
  //
  // TODO: Add any constructor code after InitializeComponent call
  //
end;

procedure TWinForm.HScrollBar1_Scroll(sender: System.Object; e: System.Windows.Forms.ScrollEventArgs);
begin
  panel1.BackColor:=Color.FromArgb(hScrollBar1.Value,hScrollBar2.Value,hScrollBar3.Value);
end;

end.
