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,071
  • 3
  • 14
  • 34

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
  • 143,427
  • 25
  • 201
  • 198