Change the color of a part of the text in a textbox
<p>I only know how to change the color of the entire text of a string, instead of a certain part. I want the program to change the color of the word "print", if the program contains "print" and not the entire text.</p>

<p>Here is my code:</p>

<pre><code>Public Class Form1
    Private Sub codeTextBox_TextChanged(sender As Object, e As EventArgs) Handles codeTextBox.TextChanged
        Dim codeInput As String = codeTextBox.Text
        If codeInput.Contains("print") Then
            codeTextBox.ForeColor = Color.Blue
        End If
    End Sub
End Class
</code></pre>