
请问c#怎么遍历到shape 控件
展开全部
foreach (Control control in this.Controls)//遍历本窗体中所有的ComboBox控件
{
if (control.GetType().ToString() == "System.Windows.Forms.ComboBox")
{
(control as ComboBox).SelectedIndex = 1;
}
}
{
if (control.GetType().ToString() == "System.Windows.Forms.ComboBox")
{
(control as ComboBox).SelectedIndex = 1;
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询