In VB 2005, I'm using a RichTextBox control. I have a button for making all selected text upper-case. The only way I can seem to do this is by setting the RichTextBox's .SelectedText property = .SelectedText.ToUpper.
While this accomplishes the goal of capitalizing the text, it defaults the formatting and color of the text to the RichTextBox's .Font and .ForeColor properties. It does this whether there are multiple formats/colors among the selected text or not.
I need for the format(s) and color(s) of the selected text to be retained, especially if I ever want to make the Replace portion of a Find/Replace method useful at all in the future (let alone this upper-casing method). How can I do this?