Winform循环遍历界面上的所有控件 foreach,controls,allowdrop
foreach(System.Windows.Forms.Controlcontrolinthis.groupBox2.Controls)//遍历groupBox2上的所有控件 { if(controlisSystem.Windows.Forms.PictureBox) { System.Windows.Forms.PictureBoxpb=(System.Windows.Forms.PictureBox)control; p …… 阅读全文