GetAllControls – Retrieving all the controls inside a container and its sub-containers

GetAllControls – Retrieving all the controls inside a container and its sub-containers

' Returns an array with all the controls in the specified container control and ' its child containers' Example:'    ' print the name of all the controls on the form and its child container ' controls'    Dim ctl As Control'    For Each ctl In GetAllControls(Me)'        Debug.WriteLine(ctl.Name)'    NextFunction GetAllControls(ByVal container As Control) As Control()    Dim al As New ArrayList    Dim ctl As Control    For Each ctl In container.Controls        GetAllControlsHelper(ctl, al)    Next    Return al.ToArray(GetType(Control))End FunctionSub GetAllControlsHelper(ByVal container As Control, ByVal al As ArrayList)    ' add this control to the ArrayList    al.Add(container)    ' add all its child controls, by calling this routine recursively    Dim ctl As Control    For Each ctl In container.Controls        GetAllControlsHelper(ctl, al)    NextEnd Sub

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular