标签:winform com style class c tar t sp art ble window
foreach (System.Windows.Forms.Control control in this.groupBox2.Controls)//遍历groupBox2上的所有控件
{
if (control is System.Windows.Forms.PictureBox)
{
System.Windows.Forms.PictureBox pb = (System.Windows.Forms.PictureBox)control;
pb.AllowDrop = true;
}
if (cl is CheckBox)
{
Label lab = cl as
Label;
lab.Enabled =
false;//在这里设置
}
}
c# winform 循环遍历界面上的所有控件,foreach,Controls,AllowDrop,码迷,mamicode.com
c# winform 循环遍历界面上的所有控件,foreach,Controls,AllowDrop
标签:winform com style class c tar t sp art ble window
原文地址:http://www.cnblogs.com/jianghaidong/p/3699225.html