Quote Originally Posted by Seraphino
I am making a coding assistant program, and I want to make it so that after a user presses the space bar, if the last word typed is one that the program recognizes, it will turn it to the color specified.

Basically, I want to do syntax highlighting. If there is any easier way than this please tell me, or else post some code.
Hi,

I think you can use the ColorDialog for that, here's an exa^mple with a RichTextBox and a Button.

VB Code:
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         If ColorDialog1.ShowDialog <> Windows.Forms.DialogResult.Cancel Then
  3.             rtxtEditor.ForeColor = ColorDialog1.Color
  4.         End If
  5.     End Sub

Hope it helps,

sparrow1