There are now quite a few code repository programs on the market, and they all implement syntax colouring. This gives the program the look and feel of Visual Basic, but with their own customised interface. This control works by having a list of words that need to be coloured, and then checks the text for an occurrences of this text. It also handles comments and underscores.
WEBINAR: On-demand webcast
How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >
This control requires the Microsoft RichTextBox control 6.0 although you could change the design to support an earlier version.
The download comes with a full demonstration project which shows you how to change the colours (using the ChooseColour dialog).
Download Zipped Project File 56k