I am using a ToUpper statement on a RichTextBox and I have found it is destroying the color formatting.
This is the output of the RTB before the ToUpper statement
This is the statement I am usingCode:{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} {\colortbl ;\red255\green255\blue255;\red0\green255\blue0;} \viewkind4\uc1\pard\cf1\f0\fs192 There are a great number of things you \cf2\bullet\cf1 cannot do with a Declare statement. \par }
This is the output after the ToUpper statementCode:RichTextBox1.Text = RichTextBox1.Text.ToUpper()
Does anyone have any thoughts on why this happens and how to solve it?Code:{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} {\colortbl ;\red255\green255\blue255;} \viewkind4\uc1\pard\cf1\f0\fs192 THERE ARE A GREAT NUMBER OF THINGS YOU \bullet CANNOT DO WITH A DECLARE STATEMENT. \par }
Thanks




Reply With Quote
