//容器控件为tableLayoutPanel1
foreach (Control label in tableLayoutPanel1.Controls) { if (label.GetType().ToString() == "System.Windows.Forms.Label") { label.BackColor = Color.Red; } }