I'm trying to make a TextBox with syntax highlighting (for (HTML/CSS) in VB.NET 2008.
I figured that if I use RichTextBox.Find(), I can color specific text, but then I need to call RichTextBox.DeselectAll().
The problem is that the the cursor jumps to the beginning of the RTB.
I'm using WinForms.
You can get and set the cursor position using the
Therefore, you can write,
Dim selStart As Integer = rtb.SelectionStart 'Do things rtb.SelectionStart = selStart