title: c# listbox with control names to change properties
body: <p>I am creating new controls and putting there names in a list box, how do i use the name selected in the list box to change the controls properties.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>//creating the label
   LabelNumber++;
   label label=new Label();
   label.BackColor=Color.Transparent;
   label.Location=new System.Drawing.Point(1,
  1);
   label.Name="Label" + LabelNumber;
   label.Text=LabelNumber.ToString();
   label.Size=new System.Drawing.Size(20,
  20);
   label.TextAlign=ContentAlignment.MiddleCenter;
   ProjectPanel.Controls.Add(label);
   ControlBox1.Items.Add(label.Name);</code></pre>
  </div>
  </div>
  </p>