private void Form1_Load(object sender, System.EventArgs e) ...{ SyntaxHighlightingTextBox shtb = new SyntaxHighlightingTextBox(); shtb.Location = new Point(0,0); shtb.Dock = DockStyle.Fill; shtb.Seperators.Add(' '); shtb.Seperators.Add(' '); shtb.Seperators.Add(' '); shtb.Seperators.Add(','); shtb.Seperators.Add('.'); shtb.Seperators.Add('-'); shtb.Seperators.Add('+'); //shtb.Seperators.Add('*'); //shtb.Seperators.Add('/'); Controls.Add(shtb); shtb.WordWrap = false; shtb.ScrollBars = RichTextBoxScrollBars.Both;// & RichTextBoxScrollBars.ForcedVertical; shtb.FilterAutoComplete = true; /**//*shtb.HighlightDescriptors.Add(new HighlightDescriptor("<", Color.Gray, null, DescriptorType.Word, DescriptorRecognition.WholeWord, true)); shtb.HighlightDescriptors.Add(new HighlightDescriptor("<<", ">>", Color.DarkGreen, null, DescriptorType.ToCloseToken, DescriptorRecognition.StartsWith, false));*/ shtb.HighlightDescriptors.Add(new HighlightDescriptor("Hello", Color.Red, null, DescriptorType.Word, DescriptorRecognition.WholeWord, true)); shtb.HighlightDescriptors.Add(new HighlightDescriptor("Hellofatime", Color.Green, null, DescriptorType.Word, DescriptorRecognition.WholeWord, true)); shtb.HighlightDescriptors.Add(new HighlightDescriptor("Helsinky", Color.Maroon, null, DescriptorType.Word, DescriptorRecognition.WholeWord, true)); shtb.HighlightDescriptors.Add(new HighlightDescriptor("World", Color.Blue, null, DescriptorType.Word, DescriptorRecognition.WholeWord, true)); shtb.HighlightDescriptors.Add(new HighlightDescriptor("/*", "*/", Color.Magenta, null, DescriptorType.ToCloseToken, DescriptorRecognition.StartsWith, false)); shtb.HighlightDescriptors.AddRange(new HighlightDescriptor[] ...{new HighlightDescriptor("string",Color.Blue,null,DescriptorType.Word,DescriptorRecognition.WholeWord,true), new HighlightDescriptor("public",Color.Blue,null,DescriptorType.Word,DescriptorRecognition.WholeWord,true), new HighlightDescriptor("private",Color.Blue,null,DescriptorType.Word,DescriptorRecognition.WholeWord,true), new HighlightDescriptor("protected",Color.Blue,null,DescriptorType.Word,DescriptorRecognition.WholeWord,true)}); }