Version

FindContainedComponentByName Method

Does a recursive search through the container's descendant controls and components and returns the component with the specified name.
Syntax
'Declaration
 
Public Shared Function FindContainedComponentByName( _
   ByVal container As Control, _
   ByVal componentName As String _
) As Component
public static Component FindContainedComponentByName( 
   Control container,
   string componentName
)

Parameters

container
The container control.
componentName
The name of the component or control.

Return Value

The first component whose Name property matches or null.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also