Does anyone have a piece of code to make all Controls (or even all TextBoxes) in a Form which is read-only at once without having to set every Control to read-only individua
I haven't tested this, but it should work:
foreach (var textBox in this.Controls.OfType<TextBox>()) textBox.ReadOnly = true;
Edit: This is not such a good solution it seems: see Timwi's comment.