I need an extremely fast way to color specific words a color such as vbBlue or RGB(12,90,0) or something. The thing is it has to be able to process multiple thousand words in just a few seconds.
Printable View
I need an extremely fast way to color specific words a color such as vbBlue or RGB(12,90,0) or something. The thing is it has to be able to process multiple thousand words in just a few seconds.
A regular textbox does not support that. You have to use a RichTextBox, and here is a thread which shows you how to highlight certain words.
Already tried that; its extremely slow for something that has to color 50k words
If you study the RTFtext property of a richtextbox you'll get soon what tags you need to activate and deactivate blue text, next you need to do is operate the RTFtext in a buffer string instead (and the richtextbox won't update all the time causing slowness) - Use instr and Mid to search and insert the tags, it's not the fastest way either but i'm sure it's lot more faster than on that thread. Fastest way would be to convert into a byte array and use copymemory