private void aktivierenToolStripMenuItem_Click(object sender, EventArgs e) { using (ActivateForm af = new ActivateForm()) { af.ShowDialog(); int cat = af.Category; int val = af.Value; foreach (Control child in this.Controls) { if (child.Name == "cat" + cat + "_" + val) { child.Enabled = true; Button btn = child as Button; btn.UseVisualStyleBackColor = true; } } } }