代码
private
void
allCtl(Control ctl)
{
foreach (Control c in ctl.Controls)
{
if (c.Controls.Count < 1 )
{
// do what you want;
break ;
}
else
{
allCtl(c);
}
}
}
{
foreach (Control c in ctl.Controls)
{
if (c.Controls.Count < 1 )
{
// do what you want;
break ;
}
else
{
allCtl(c);
}
}
}