Controls can be nested within other controls; they're not all direct children of the form.
You'll need a recursive method to process the entire control tree:
private void btnFcolor_Click(object sender, EventArgs e)
{
using (var dlg = new ColorDialog())
{
if (dlg.ShowDialog() == DialogResult.OK)
{
SetLabelColor(Controls.Cast<Control>(), dlg.Color);
Properties.Settings.Default.FormForeColor = dlg.Color;
Properties.Settings.Default.Save();
}
}
}
private void SetLabelColor(IEnumerable<Control> controls, Color color)
{
foreach (Label label in controls.OfType<Label>())
{
label.ForColor = color;
}
foreach (Control control in controls.Where(c => c.HasChildren))
{
SetLabelColor(control.Controls.Cast<Control>(), color);
}
}