You can enumerate controls and disable them:
foreach(var control in Controls.Cast<Control>()) control.Enabled = false; If you want to disable only buttons, you can use LINQ
foreach(var control in Controls.OfType<Button>()) control.Enabled = false; Or if you have some other criteria of selection
var controlsToDisable = Controls.OfType<TextBox>() .Where(t => t.Name.StartsWith("Control")); // etc foreach(var control in controlsToDisable) control.Enabled = false;