void GetControl (Control c)
{
MessageBox.Show(c.GetType().Name);
foreach (Control ch in c.Controls)
GetControl(ch);
}在Form中这样使用:
GetControl(this);

解决方案 »

  1.   

    for(int i=0;i<this.Controls.Count;i++)
    {
    MessageBox.Show(this.Controls[i].GetType().ToString());
    }
      

  2.   

    你看看:确定指定的服务器控件是否在父服务器控件的 ControlCollection 对象中。
    public virtual bool Contains(
       Control c
    );
    对你有帮助否!
    MSDN:ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfsystemwebuicontrolcollectionmemberstopic.htm晕!高难度你才给20分呀!呵呵!太小气了吧!
      

  3.   

    用 Form类的 Container 属性
      

  4.   

    不用第归循环可以实现吗?如果控件是放在GroupBox,tabControl中的话,form对象应该取不到这些container中的控件的。