Handle the TextBox.TextChanged event.
1) Save the TextBox.SelectionStart property.
2) Use the
TextInfo.ToTitleCase Method[
^] on the Text Property, saving the result in a new string variable
3) If the Text property is different from the new string, set the Text to the new string, and restore the SelectionStart property. Otherwise, do nothing.
If you don't do it this way, your cursor will move to the start of the TextBox every time you type a character (SelectionStart fixes this), or the event will enter an infinite loop (The equality test fixes this)