递归容器中所有控件

来源:互联网 发布:中国网络治理 编辑:程序博客网 时间:2024/05/23 14:56

    Sub FindControl(ByVal Ctrls As Control)

        For Each C As Control In Ctrls.Controls

            MessageBox.Show(C.Name)

            If C.HasChildren Then

                FindControl(C)

            End If

        Next

    End Sub