发现这样可以获取到窗体内控件但是为什么要用两个froeach才可以获取到...还有更好的方法吗?
foreach (Control thecontrol in Form.FromChildHandle(this.Handle).Controls)
{
foreach (Control con in thecontrol.Controls)
{
if (con.GetType() == new TextBox().GetType())
{
} }
}
我还是个初学者
真心求教
foreach (Control thecontrol in Form.FromChildHandle(this.Handle).Controls)
{
foreach (Control con in thecontrol.Controls)
{
if (con.GetType() == new TextBox().GetType())
{
} }
}
我还是个初学者
真心求教
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货