title: How to access a dynamically created checkbox in Windows Form
body: <p>In <code>form_load</code> event I create three check boxes. Then with a <code>button_click</code> event I want to check the state of the check boxes, but they are not available in my <code>if</code> statement. I found this piece of code as an example:</p>
  
  <pre><code>CheckBox chk = new CheckBox();
  chk.Top = 50;
  chk.Left = 50;
  chk.Text = "Check Box Test";
  chk.Name = "chkTest";
  this.Controls.Add(chk);
  CheckBox chkTest = (CheckBox)Controls["chkTest"];
  </code></pre>
  
  <p>which works only if I check the state inside the <code>form_load</code>.  How do I access the check boxes with a button_click?</p>