Post your code and maybe we can point out some ways to improve it.
You're maybe handling the strings wrong (making lots of new/copies?), or calling some function of the RichTextBox too often -- if you call some function of a gui control millions of times, it's going to take a long time. Hard to say w/o seeing how you did it..
I just completely removed it lol. It was some snippet I found on vbforums. It basically scanned richtextbox1 when a document was opened and changed the color of the strings, and when you typed on textchanged event it would do the same. It was really really slow when loading a 53 kb XML file, and it scrolled all over the place like crazy as you typed rescanning everything. It was not a good snippet at all LOL. I'm just not exactly sure on how to do the syntax color stuffs that wont make the program hang when loading a large file, or scroll all over when typing lol. Also sorry for the 3 day wait on a reply. I have been working like crazy and had no time to get on here
Originally Posted by ||Excision||
I just completely removed it lol. It was some snippet I found on vbforums. It basically scanned richtextbox1 when a document was opened and changed the color of the strings, and when you typed on textchanged event it would do the same. It was really really slow when loading a 53 kb XML file, and it scrolled all over the place like crazy as you typed rescanning everything. It was not a good snippet at all LOL. I'm just not exactly sure on how to do the syntax color stuffs that wont make the program hang when loading a large file, or scroll all over when typing lol. Also sorry for the 3 day wait on a reply. I have been working like crazy and had no time to get on here
Scanning works fine (for that sample), however the snippet could be improved by only scanning X length near the text change.