Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Dim txtName As New TextBox()
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each ctrl2 As Control In Me.Controls("PanelM").Controls
If Me.Controls.GetType Is GetType(System.Windows.Forms.TextBox) Then
MsgBox(txtName.Text.ToString)
End If
Next
End If
Next
End Sub