title: Adding controls to a panel programmatically
body: <p>I'm trying to add a group of four radio buttons to a form. There are other radio buttons so I'm grouping them by placing them on a Panel. However using the below I just get the panel added to the form without the radio buttons... Am I doing something wrong here?            </p>
  
  <pre><code>Dim arrRButton(3) As RadioButton
  arrRButton(0) = New RadioButton
  arrRButton(1) = New RadioButton
  arrRButton(2) = New RadioButton
  arrRButton(3) = New RadioButton           
  
  With arrRButton(0)
    .AutoSize = True
    .Checked = True
    .Location = New System.Drawing.Point(77, 139)
    .Name = "RadioButton5"
    .Size = New System.Drawing.Size(55, 17)
    .TabIndex = 48
    .TabStop = True
    .Text = "NEAR"
    .UseVisualStyleBackColor = True
  End With
  '.... etc
  
  'Panel2
  Dim Panel2 As New Panel
  With Panel2
    .Controls.Add(arrRButton(0))
    .Controls.Add(arrRButton(1))
    .Controls.Add(arrRButton(2))
    .Controls.Add(arrRButton(3))
    .Location = New System.Drawing.Point(61, 130)
    .Name = "Panel2"
    .Size = New System.Drawing.Size(300, 24)
  End With
  
  Me.Controls.Add(Panel2)
  </code></pre>