0

Is there a way i can make all TextBoxes in a Form UPPERCASE. What i have been doing is

txtPersonName.CharacterCasing = CharacterCasing.Upper;
....;
AndroidAL
  • 1,111
  • 4
  • 15
  • 35

1 Answers1

0

You can get all TextBox controls in Controls collection of Form and set the CharacterCasing property to CharacterCasing.Upper

foreach(var tb in this.Controls.OfType<TextBox>())
{
    tb.CharacterCasing = CharacterCasing.Upper;
}
Adil
  • 146,340
  • 25
  • 209
  • 204