So, what’s the main behavior difference the Visual Basic 6.0 and Visual Basic .NET Controls collection?
In Visual Basic 6.0, this collection contains all the controls that have been added to a particular Form, including controls that were added to other container controls such as PictureBox or Frame controls. In Visual Basic .NET, the Controls collection includes only the controls that were directly added to the control that owns the collection. For example, if a Form contains a Panel control that contains a Button control named button1, button1 will not be contained in the Controls collection that belongs to the Form. Instead of that, button1 will be contained in the panel’s Controls collection. As a consequence, iterating through the elements in a form’s Controls collection will not consider all the controls contained in the form, as it did in Visual Basic 6.0.