Sometimes embedding Eclipse or a full-fledged editor is not suitable. For some other reason, this is redundant or redundant, or wrong. I appreciate the first tendency suggested in other posts not to reinvent here, but in some cases a little invention is required. For example, the text field used to create messages .... is neither Eclipse nor the built-in Visual Studio. I wonder why?
It is important to ask a question - to build or buy? - but sometimes the correct answer is BUILD IT.
XPathVisualizer provides a simple example of a text folding code editor implemented in C # and based on RichTextBox. It is not a VB, although it is an XML editor. But the general principles apply.
Look at that.

To dynamically implement coloring of XML syntax, when a user enters text, he uses a separate background thread. The reasons and some details are described in a separate answer about stack overflow .
You could do something similar for your COBOL / VB stuff. XPathVisualizer is open source, licensed by MS-PL, so you can browse and borrow.
source share