<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FGUI_Windows_Forms%2FTrackBar</id>
		<title>Csharp/CSharp Tutorial/GUI Windows Forms/TrackBar - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FGUI_Windows_Forms%2FTrackBar"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/TrackBar&amp;action=history"/>
		<updated>2026-04-30T00:10:46Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/TrackBar&amp;diff=5435&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/TrackBar&amp;diff=5435&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/TrackBar&amp;diff=5436&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/TrackBar&amp;diff=5436&amp;oldid=prev"/>
				<updated>2010-05-26T12:15:28Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Color Tracker==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
public class TrackColorForm : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
  private System.ruponentModel.Container components = null;&lt;br /&gt;
  private System.Windows.Forms.Label label4;&lt;br /&gt;
  private System.Windows.Forms.Label label2;&lt;br /&gt;
  private System.Windows.Forms.TrackBar blueTrackBar;&lt;br /&gt;
  private System.Windows.Forms.Label label3;&lt;br /&gt;
  private System.Windows.Forms.TrackBar greenTrackBar;&lt;br /&gt;
  private System.Windows.Forms.TrackBar redTrackBar;&lt;br /&gt;
  private System.Windows.Forms.Label label1;&lt;br /&gt;
  private System.Windows.Forms.Panel panel1;&lt;br /&gt;
  private System.Windows.Forms.Label lblCurrColor;&lt;br /&gt;
  private System.Windows.Forms.PictureBox colorBox;&lt;br /&gt;
  public TrackColorForm()&lt;br /&gt;
  {&lt;br /&gt;
    InitializeComponent();&lt;br /&gt;
    redTrackBar.Value = 100;&lt;br /&gt;
    greenTrackBar.Value = 255;&lt;br /&gt;
    blueTrackBar.Value = 0;&lt;br /&gt;
    UpdateColor();&lt;br /&gt;
  }&lt;br /&gt;
  protected override void Dispose( bool disposing )&lt;br /&gt;
  {&lt;br /&gt;
    if( disposing )&lt;br /&gt;
    {&lt;br /&gt;
      if (components != null) &lt;br /&gt;
      {&lt;br /&gt;
        components.Dispose();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    base.Dispose( disposing );&lt;br /&gt;
  }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.label4 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.label3 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.label2 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.panel1 = new System.Windows.Forms.Panel();&lt;br /&gt;
    this.blueTrackBar = new System.Windows.Forms.TrackBar();&lt;br /&gt;
    this.greenTrackBar = new System.Windows.Forms.TrackBar();&lt;br /&gt;
    this.redTrackBar = new System.Windows.Forms.TrackBar();&lt;br /&gt;
    this.colorBox = new System.Windows.Forms.PictureBox();&lt;br /&gt;
    this.lblCurrColor = new System.Windows.Forms.Label();&lt;br /&gt;
    this.panel1.SuspendLayout();&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.blueTrackBar)).BeginInit();&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.greenTrackBar)).BeginInit();&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.redTrackBar)).BeginInit();&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // label4&lt;br /&gt;
    // &lt;br /&gt;
    this.label4.Font = new System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 15F);&lt;br /&gt;
    this.label4.Location = new System.Drawing.Point(16, 88);&lt;br /&gt;
    this.label4.Name = &amp;quot;label4&amp;quot;;&lt;br /&gt;
    this.label4.Size = new System.Drawing.Size(240, 32);&lt;br /&gt;
    this.label4.TabIndex = 9;&lt;br /&gt;
    this.label4.Text = &amp;quot;Pick your slider here:&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // label1&lt;br /&gt;
    // &lt;br /&gt;
    this.label1.Font = new System.Drawing.Font(&amp;quot;Arial&amp;quot;, 15F);&lt;br /&gt;
    this.label1.Location = new System.Drawing.Point(24, 16);&lt;br /&gt;
    this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
    this.label1.Size = new System.Drawing.Size(88, 32);&lt;br /&gt;
    this.label1.TabIndex = 4;&lt;br /&gt;
    this.label1.Text = &amp;quot;Red:&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // label3&lt;br /&gt;
    // &lt;br /&gt;
    this.label3.Font = new System.Drawing.Font(&amp;quot;Arial&amp;quot;, 15F);&lt;br /&gt;
    this.label3.Location = new System.Drawing.Point(24, 104);&lt;br /&gt;
    this.label3.Name = &amp;quot;label3&amp;quot;;&lt;br /&gt;
    this.label3.Size = new System.Drawing.Size(88, 32);&lt;br /&gt;
    this.label3.TabIndex = 6;&lt;br /&gt;
    this.label3.Text = &amp;quot;Blue:&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // label2&lt;br /&gt;
    // &lt;br /&gt;
    this.label2.Font = new System.Drawing.Font(&amp;quot;Arial&amp;quot;, 15F);&lt;br /&gt;
    this.label2.Location = new System.Drawing.Point(24, 64);&lt;br /&gt;
    this.label2.Name = &amp;quot;label2&amp;quot;;&lt;br /&gt;
    this.label2.Size = new System.Drawing.Size(88, 32);&lt;br /&gt;
    this.label2.TabIndex = 5;&lt;br /&gt;
    this.label2.Text = &amp;quot;Green:&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // panel1&lt;br /&gt;
    // &lt;br /&gt;
    this.panel1.AutoScroll = true;&lt;br /&gt;
    this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
    this.panel1.Controls.Add(this.label2);&lt;br /&gt;
    this.panel1.Controls.Add(this.blueTrackBar);&lt;br /&gt;
    this.panel1.Controls.Add(this.label3);&lt;br /&gt;
    this.panel1.Controls.Add(this.greenTrackBar);&lt;br /&gt;
    this.panel1.Controls.Add(this.redTrackBar);&lt;br /&gt;
    this.panel1.Controls.Add(this.label1);&lt;br /&gt;
    this.panel1.Location = new System.Drawing.Point(16, 120);&lt;br /&gt;
    this.panel1.Name = &amp;quot;panel1&amp;quot;;&lt;br /&gt;
    this.panel1.Size = new System.Drawing.Size(384, 88);&lt;br /&gt;
    this.panel1.TabIndex = 8;&lt;br /&gt;
    // &lt;br /&gt;
    // blueTrackBar&lt;br /&gt;
    // &lt;br /&gt;
    this.blueTrackBar.Location = new System.Drawing.Point(120, 96);&lt;br /&gt;
    this.blueTrackBar.Maximum = 255;&lt;br /&gt;
    this.blueTrackBar.Name = &amp;quot;blueTrackBar&amp;quot;;&lt;br /&gt;
    this.blueTrackBar.Size = new System.Drawing.Size(240, 45);&lt;br /&gt;
    this.blueTrackBar.TabIndex = 1;&lt;br /&gt;
    this.blueTrackBar.TickFrequency = 5;&lt;br /&gt;
    this.blueTrackBar.TickStyle = System.Windows.Forms.TickStyle.TopLeft;&lt;br /&gt;
    this.blueTrackBar.Scroll += new System.EventHandler(this.blueTrackBar_Scroll);&lt;br /&gt;
    // &lt;br /&gt;
    // greenTrackBar&lt;br /&gt;
    // &lt;br /&gt;
    this.greenTrackBar.Location = new System.Drawing.Point(120, 56);&lt;br /&gt;
    this.greenTrackBar.Maximum = 255;&lt;br /&gt;
    this.greenTrackBar.Name = &amp;quot;greenTrackBar&amp;quot;;&lt;br /&gt;
    this.greenTrackBar.Size = new System.Drawing.Size(240, 45);&lt;br /&gt;
    this.greenTrackBar.TabIndex = 3;&lt;br /&gt;
    this.greenTrackBar.TickFrequency = 5;&lt;br /&gt;
    this.greenTrackBar.TickStyle = System.Windows.Forms.TickStyle.TopLeft;&lt;br /&gt;
    this.greenTrackBar.Scroll += new System.EventHandler(this.greenTrackBar_Scroll);&lt;br /&gt;
    // &lt;br /&gt;
    // redTrackBar&lt;br /&gt;
    // &lt;br /&gt;
    this.redTrackBar.Location = new System.Drawing.Point(120, 16);&lt;br /&gt;
    this.redTrackBar.Maximum = 255;&lt;br /&gt;
    this.redTrackBar.Name = &amp;quot;redTrackBar&amp;quot;;&lt;br /&gt;
    this.redTrackBar.Size = new System.Drawing.Size(232, 45);&lt;br /&gt;
    this.redTrackBar.TabIndex = 2;&lt;br /&gt;
    this.redTrackBar.TickFrequency = 5;&lt;br /&gt;
    this.redTrackBar.TickStyle = System.Windows.Forms.TickStyle.TopLeft;&lt;br /&gt;
    this.redTrackBar.Scroll += new System.EventHandler(this.redTrackBar_Scroll);&lt;br /&gt;
    // &lt;br /&gt;
    // colorBox&lt;br /&gt;
    // &lt;br /&gt;
    this.colorBox.BackColor = System.Drawing.Color.Blue;&lt;br /&gt;
    this.colorBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;&lt;br /&gt;
    this.colorBox.Location = new System.Drawing.Point(16, 16);&lt;br /&gt;
    this.colorBox.Name = &amp;quot;colorBox&amp;quot;;&lt;br /&gt;
    this.colorBox.Size = new System.Drawing.Size(384, 56);&lt;br /&gt;
    this.colorBox.TabIndex = 0;&lt;br /&gt;
    this.colorBox.TabStop = false;&lt;br /&gt;
    // &lt;br /&gt;
    // lblCurrColor&lt;br /&gt;
    // &lt;br /&gt;
    this.lblCurrColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
    this.lblCurrColor.Font = new System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 14F);&lt;br /&gt;
    this.lblCurrColor.Location = new System.Drawing.Point(16, 224);&lt;br /&gt;
    this.lblCurrColor.Name = &amp;quot;lblCurrColor&amp;quot;;&lt;br /&gt;
    this.lblCurrColor.Size = new System.Drawing.Size(392, 40);&lt;br /&gt;
    this.lblCurrColor.TabIndex = 7;&lt;br /&gt;
    this.lblCurrColor.Text = &amp;quot;label4&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // TrackColorForm&lt;br /&gt;
    // &lt;br /&gt;
    this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(424, 285);&lt;br /&gt;
    this.Controls.Add(this.label4);&lt;br /&gt;
    this.Controls.Add(this.panel1);&lt;br /&gt;
    this.Controls.Add(this.lblCurrColor);&lt;br /&gt;
    this.Controls.Add(this.colorBox);&lt;br /&gt;
    this.panel1.ResumeLayout(false);&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.blueTrackBar)).EndInit();&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.greenTrackBar)).EndInit();&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.redTrackBar)).EndInit();&lt;br /&gt;
    this.ResumeLayout(false);&lt;br /&gt;
  }&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new TrackColorForm());&lt;br /&gt;
  }&lt;br /&gt;
  protected void greenTrackBar_Scroll (object sender, System.EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    UpdateColor();&lt;br /&gt;
  }&lt;br /&gt;
  protected void redTrackBar_Scroll (object sender, System.EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    UpdateColor();&lt;br /&gt;
  }&lt;br /&gt;
  protected void blueTrackBar_Scroll (object sender, System.EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    UpdateColor();&lt;br /&gt;
  }&lt;br /&gt;
  private void UpdateColor()&lt;br /&gt;
  {&lt;br /&gt;
    Color c = Color.FromArgb(redTrackBar.Value, greenTrackBar.Value, blueTrackBar.Value);&lt;br /&gt;
    colorBox.BackColor = c;&lt;br /&gt;
    lblCurrColor.Text = string.Format(&amp;quot;Current color is: ({0}, {1}, {2})&amp;quot;, redTrackBar.Value, greenTrackBar.Value,blueTrackBar.Value);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TrackBar on value changed event handler==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class TrackBars : Form&lt;br /&gt;
{&lt;br /&gt;
  Panel pnl;&lt;br /&gt;
  PictureBox pb;&lt;br /&gt;
  TrackBar htbar;&lt;br /&gt;
  TrackBar vtbar;&lt;br /&gt;
  public TrackBars()&lt;br /&gt;
  {&lt;br /&gt;
    Size = new Size(500,520);&lt;br /&gt;
    Image img = Image.FromFile(&amp;quot;YourFile.bmp&amp;quot;);&lt;br /&gt;
    pnl = new Panel();&lt;br /&gt;
    pnl.Parent = this;&lt;br /&gt;
    pnl.BorderStyle = BorderStyle.FixedSingle;&lt;br /&gt;
    pnl.Size = new Size(400,400);&lt;br /&gt;
    pnl.Location = new Point(10,10);&lt;br /&gt;
    pb = new PictureBox();&lt;br /&gt;
    pb.Parent = pnl;&lt;br /&gt;
    pb.Size = new Size(200, 200);&lt;br /&gt;
    pb.Location = new Point((pnl.Size.Width / 2) - (pb.Size.Width / 2),&lt;br /&gt;
                (pnl.Size.Height / 2) - (pb.Size.Height /2));&lt;br /&gt;
    pb.BorderStyle = BorderStyle.FixedSingle;&lt;br /&gt;
    pb.SizeMode = PictureBoxSizeMode.StretchImage;&lt;br /&gt;
    pb.Image = img;&lt;br /&gt;
    htbar = new TrackBar();&lt;br /&gt;
    htbar.Parent = this;&lt;br /&gt;
    htbar.Orientation = Orientation.Horizontal;&lt;br /&gt;
    htbar.Size = new Size(pnl.Width, 10);&lt;br /&gt;
    htbar.Location = new Point(pnl.Left, pnl.Bottom + 25);&lt;br /&gt;
    htbar.TickStyle = TickStyle.BottomRight;&lt;br /&gt;
    htbar.TickFrequency = 25;&lt;br /&gt;
    htbar.Minimum = 25;&lt;br /&gt;
    htbar.Maximum = 400;&lt;br /&gt;
    htbar.SmallChange = 10;&lt;br /&gt;
    htbar.LargeChange = 25;&lt;br /&gt;
    htbar.BackColor = Color.Yellow;&lt;br /&gt;
    htbar.Value = pb.Width;&lt;br /&gt;
    htbar.ValueChanged += new EventHandler(htbar_OnValueChanged);&lt;br /&gt;
    vtbar = new TrackBar();&lt;br /&gt;
    vtbar.Parent = this;&lt;br /&gt;
    vtbar.Orientation = Orientation.Vertical;&lt;br /&gt;
    vtbar.Size = new Size(25, pnl.Height);  &lt;br /&gt;
    vtbar.Location = new Point(pnl.Right + 25, pnl.Top);&lt;br /&gt;
    vtbar.TickStyle = TickStyle.Both;&lt;br /&gt;
    vtbar.SetRange(25,400);&lt;br /&gt;
    vtbar.SmallChange = 10;&lt;br /&gt;
    vtbar.LargeChange = 50;&lt;br /&gt;
    vtbar.TickFrequency = vtbar.Maximum / 20;&lt;br /&gt;
    vtbar.BackColor = Color.Pink;&lt;br /&gt;
    vtbar.Value = pb.Height;&lt;br /&gt;
    vtbar.ValueChanged += new EventHandler(vtbar_OnValueChanged);&lt;br /&gt;
  }&lt;br /&gt;
  private void htbar_OnValueChanged(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    pb.Size = new Size(htbar.Value, pb.Height);&lt;br /&gt;
  }&lt;br /&gt;
  private void vtbar_OnValueChanged(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    pb.Size = new Size(pb.Width, vtbar.Value);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new TrackBars());&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TrackBar: SmallChange, LargeChange, Minimum, Maximum==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
   &lt;br /&gt;
class ColorTrackBar: Form&lt;br /&gt;
{&lt;br /&gt;
     Panel      panel;&lt;br /&gt;
     Label[]    alabelName  = new Label[3];&lt;br /&gt;
     Label[]    alabelValue = new Label[3];&lt;br /&gt;
     TrackBar[] atrackbar   = new TrackBar[3];&lt;br /&gt;
   &lt;br /&gt;
     public static void Main()&lt;br /&gt;
     {&lt;br /&gt;
          Application.Run(new ColorTrackBar());&lt;br /&gt;
     }&lt;br /&gt;
     public ColorTrackBar()&lt;br /&gt;
     {&lt;br /&gt;
          Color[] acolor = { Color.Red, Color.Green, Color.Blue };&lt;br /&gt;
   &lt;br /&gt;
          panel = new Panel();&lt;br /&gt;
          panel.Parent = this;&lt;br /&gt;
          panel.Location = new Point(0, 0);&lt;br /&gt;
          panel.BackColor = Color.White;&lt;br /&gt;
   &lt;br /&gt;
          for (int i = 0; i &amp;lt; 3; i++)&lt;br /&gt;
          {&lt;br /&gt;
               alabelName[i] = new Label();&lt;br /&gt;
               alabelName[i].Parent = panel;&lt;br /&gt;
               alabelName[i].ForeColor = acolor[i];&lt;br /&gt;
               alabelName[i].Text = &amp;quot;&amp;amp;&amp;quot; + acolor[i].ToKnownColor();&lt;br /&gt;
               alabelName[i].TextAlign = ContentAlignment.MiddleCenter;&lt;br /&gt;
   &lt;br /&gt;
               atrackbar[i] = new TrackBar();&lt;br /&gt;
               atrackbar[i].Parent = panel;&lt;br /&gt;
               atrackbar[i].Orientation = Orientation.Vertical;&lt;br /&gt;
               atrackbar[i].BackColor = acolor[i];&lt;br /&gt;
               atrackbar[i].SmallChange = 1;&lt;br /&gt;
               atrackbar[i].LargeChange = 16;&lt;br /&gt;
               atrackbar[i].Minimum = 0;&lt;br /&gt;
               atrackbar[i].Maximum = 255;&lt;br /&gt;
               atrackbar[i].TickFrequency = 16;&lt;br /&gt;
               atrackbar[i].ValueChanged += new EventHandler(TrackBarOnValueChanged);&lt;br /&gt;
   &lt;br /&gt;
               alabelValue[i] = new Label();&lt;br /&gt;
               alabelValue[i].Parent = panel;&lt;br /&gt;
               alabelValue[i].TextAlign = ContentAlignment.MiddleCenter;&lt;br /&gt;
          }&lt;br /&gt;
          Color color = BackColor;&lt;br /&gt;
          atrackbar[0].Value = color.R; // Generates ValueChanged event&lt;br /&gt;
          atrackbar[1].Value = color.G;&lt;br /&gt;
          atrackbar[2].Value = color.B;&lt;br /&gt;
   &lt;br /&gt;
          OnResize(EventArgs.Empty);&lt;br /&gt;
     }&lt;br /&gt;
     protected override void OnResize(EventArgs ea)&lt;br /&gt;
     {&lt;br /&gt;
          base.OnResize(ea);&lt;br /&gt;
   &lt;br /&gt;
          int cx = ClientSize.Width;&lt;br /&gt;
          int cy = ClientSize.Height;&lt;br /&gt;
          int cyFont = Font.Height;&lt;br /&gt;
   &lt;br /&gt;
          panel.Size = new Size(cx / 2, cy);&lt;br /&gt;
   &lt;br /&gt;
          for (int i = 0; i &amp;lt; 3; i++)&lt;br /&gt;
          {&lt;br /&gt;
               alabelName[i].Location = new Point(i * cx / 6, cyFont / 2);&lt;br /&gt;
               alabelName[i].Size = new Size(cx / 6, cyFont);&lt;br /&gt;
   &lt;br /&gt;
               atrackbar[i].Height = cy - 4 * cyFont;&lt;br /&gt;
               atrackbar[i].Location = &lt;br /&gt;
                    new Point((1 + 2 * i) * cx / 12 - atrackbar[i].Width / 2,&lt;br /&gt;
                              2 * cyFont);&lt;br /&gt;
   &lt;br /&gt;
               alabelValue[i].Location = new Point(i * cx / 6,&lt;br /&gt;
                                                   cy - 3 * cyFont / 2);&lt;br /&gt;
               alabelValue[i].Size = new Size(cx / 6, cyFont);&lt;br /&gt;
          }&lt;br /&gt;
     }&lt;br /&gt;
     void TrackBarOnValueChanged(object obj, EventArgs ea)&lt;br /&gt;
     {&lt;br /&gt;
          for (int i = 0; i &amp;lt; 3; i++)&lt;br /&gt;
               if((TrackBar) obj == atrackbar[i])&lt;br /&gt;
                    alabelValue[i].Text = atrackbar[i].Value.ToString();&lt;br /&gt;
   &lt;br /&gt;
          BackColor = Color.FromArgb(atrackbar[0].Value, &lt;br /&gt;
                                     atrackbar[1].Value,&lt;br /&gt;
                                     atrackbar[2].Value);&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TractBar Large/Small range==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class TrackBars : Form&lt;br /&gt;
{&lt;br /&gt;
  Panel pnl;&lt;br /&gt;
  PictureBox pb;&lt;br /&gt;
  TrackBar htbar;&lt;br /&gt;
  TrackBar vtbar;&lt;br /&gt;
  public TrackBars()&lt;br /&gt;
  {&lt;br /&gt;
    Size = new Size(500,520);&lt;br /&gt;
    Image img = Image.FromFile(&amp;quot;YourFile.bmp&amp;quot;);&lt;br /&gt;
    pnl = new Panel();&lt;br /&gt;
    pnl.Parent = this;&lt;br /&gt;
    pnl.BorderStyle = BorderStyle.FixedSingle;&lt;br /&gt;
    pnl.Size = new Size(400,400);&lt;br /&gt;
    pnl.Location = new Point(10,10);&lt;br /&gt;
    pb = new PictureBox();&lt;br /&gt;
    pb.Parent = pnl;&lt;br /&gt;
    pb.Size = new Size(200, 200);&lt;br /&gt;
    pb.Location = new Point((pnl.Size.Width / 2) - (pb.Size.Width / 2),&lt;br /&gt;
                (pnl.Size.Height / 2) - (pb.Size.Height /2));&lt;br /&gt;
    pb.BorderStyle = BorderStyle.FixedSingle;&lt;br /&gt;
    pb.SizeMode = PictureBoxSizeMode.StretchImage;&lt;br /&gt;
    pb.Image = img;&lt;br /&gt;
    htbar = new TrackBar();&lt;br /&gt;
    htbar.Parent = this;&lt;br /&gt;
    htbar.Orientation = Orientation.Horizontal;&lt;br /&gt;
    htbar.Size = new Size(pnl.Width, 10);&lt;br /&gt;
    htbar.Location = new Point(pnl.Left, pnl.Bottom + 25);&lt;br /&gt;
    htbar.TickStyle = TickStyle.BottomRight;&lt;br /&gt;
    htbar.TickFrequency = 25;&lt;br /&gt;
    htbar.Minimum = 25;&lt;br /&gt;
    htbar.Maximum = 400;&lt;br /&gt;
    htbar.SmallChange = 10;&lt;br /&gt;
    htbar.LargeChange = 25;&lt;br /&gt;
    htbar.BackColor = Color.Yellow;&lt;br /&gt;
    htbar.Value = pb.Width;&lt;br /&gt;
    htbar.ValueChanged += new EventHandler(htbar_OnValueChanged);&lt;br /&gt;
    vtbar = new TrackBar();&lt;br /&gt;
    vtbar.Parent = this;&lt;br /&gt;
    vtbar.Orientation = Orientation.Vertical;&lt;br /&gt;
    vtbar.Size = new Size(25, pnl.Height);  &lt;br /&gt;
    vtbar.Location = new Point(pnl.Right + 25, pnl.Top);&lt;br /&gt;
    vtbar.TickStyle = TickStyle.Both;&lt;br /&gt;
    vtbar.SetRange(25,400);&lt;br /&gt;
    vtbar.SmallChange = 10;&lt;br /&gt;
    vtbar.LargeChange = 50;&lt;br /&gt;
    vtbar.TickFrequency = vtbar.Maximum / 20;&lt;br /&gt;
    vtbar.BackColor = Color.Pink;&lt;br /&gt;
    vtbar.Value = pb.Height;&lt;br /&gt;
    vtbar.ValueChanged += new EventHandler(vtbar_OnValueChanged);&lt;br /&gt;
  }&lt;br /&gt;
  private void htbar_OnValueChanged(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    pb.Size = new Size(htbar.Value, pb.Height);&lt;br /&gt;
  }&lt;br /&gt;
  private void vtbar_OnValueChanged(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    pb.Size = new Size(pb.Width, vtbar.Value);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new TrackBars());&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>