View Single Post
Old Sep 22nd, 2005, 8:25 PM   #1
brokenhope
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 126
Rep Power: 4 brokenhope is on a distinguished road
Syntax Highlighting

Ive looked everywhere for this, ive downloaded 3 examples, and I cant find anything useful. The only thing I found was written in C# and I couldnt figure out how to translate it to VB.NET because it was written oddly. (http://www.c-sharpcorner.com/Code/20...hTextBoxP2.asp)

Anyways, I was wondering how to do this. I have 2 arrays, strHighlight(), and strColor()

strHighlight contains what to highlight, and strColor contains what color to highlight that item.

The way I was thinking of doing this is, when you click a line, or change text, the function finds the line the cursor is at, loops through everything in strHighlight for matching values, highlights with whatever the loop count is using strColor(). Then updates the whole line with the color, and replaces your cursor where it was before. I have not a clue how to write it at all, since I have nearly no experience with Rich Text Boxes, or doing things like this... can someone give me a few properties that will be helpful and what they do?
brokenhope is offline   Reply With Quote