I have a C# Windows Forms program that has a RichTextBox control. Whenever the text inside the box is changed (other than typing that change), the cursor goes back to the be
Be careful, if someone refreshes or changes totally the RichTextBox content, the focus method must be invoqued previously in order to move the caret:
richTextBox1.Focus(); int i = richTextBox1.SelectionStart; richTextBox1.Text = strPreviousBuffer; richTextBox1.SelectionStart = i;