I have a very textbox rich heavy panel (approx ~ 25 textboxes) for which I want to retrieve all my text from.
I've done so using this loop.
Dim AllItemsArray As New ArrayList
For Each txt As Control In Panel2.Controls
If txt.GetType Is GetType(TextBox) Then
This gets the controls in Tab order sequence. It also gets controls that are in containers, i.e. GroupBox.
Dim ctrl As Control = Me.GetNextControl(ctrl, True) Do While ctrl IsNot Nothing Debug.WriteLine(ctrl.Name) ctrl = Me.GetNextControl(ctrl, True) Loop