The best way is to create your own classes in such situations. It is not difficult to find sample code on the net. Even if you find it, it won't be handy, because your own code can't take the place of someone else's.
I think it is a waste of time to try understanding sample codes written by other people. In stead, you should write your own code. Yeah, it may take more time but, it will be educatinal for you.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...