title: How GroupBox control size can be managed?
body: <p>I have event Button that creates text box in run time.   </p>
  
  <pre><code>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)       Handles Button1.Click
  
    Dim textbox1 As New TextBox
    static Dim shiftDown As Integer
    static Dim counter As Integer
  
    counter += 1
    shiftDown = shiftDown + 30
    textbox1.Name = "Textbox" + counter.ToString()
    textbox1.Size = New Size(170, 10)
    textbox1.Location = New Point(10, 32 + shiftDown)
    textbox1.Visible = True
    GroupBox1.Controls.Add(textbox1)
  
  End Sub
  </code></pre>
  
  <p>All the text boxes that has been created displayed in GroupBox control dynamically.</p>
  
  <p>My question is how GroupBox control size can be managed according to quantity controls inside it.  </p>