title: Dynamically created checkboxes in Windows Form only works when offsetting in the negative x direction
body: <p>I'm creating this windows form and I want to dynamically create an array of checkboxes. Here is my code:</p>
  
  <pre><code>Dim Checkboxes(NumberOfRows - 1, NumberOfColumns - 1)
  Dim Posx, Posy As Integer
  Posx = 10
  Posy = 10
  For RowCount = 0 To NumberOfRows - 1
      For ColumnCount = 0 To NumberOfColumns - 1
          Dim checkbox = New CheckBox
          Checkboxes(RowCount, ColumnCount) = checkbox
          Controls.Add(checkbox)
          checkbox.Location = New Point(Posx, Posy)
          Posx += 20
      Next
      Posy += 20
      Posx = 10
  Next
  </code></pre>
  
  <p>The resulting form looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/vuxNC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vuxNC.jpg" alt="enter image description here"></a></p>
  
  <p>However, the checkboxes in the x-direction are not being shown. It works well in the y-direction though.</p>
  
  <p>If I change <code>Posx += 20</code> to <code>Posx -= 20</code>, the dynamically created checkboxes appear, like so (array of checkboxes get cut off by the form's left boundary):</p>
  
  <p><a href="https://i.stack.imgur.com/JODAm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JODAm.jpg" alt="enter image description here"></a></p>
  
  <p>Why do the dynamically created checkboxes only appear when offsetting in the negative x-direction, while the y-direction is fine. Why does offsetting in the positive x-direction not work? How do I fix this?</p>