I'm making a C++ code editor application using VB.NET. I'd like to change the color of the keywords as the user types it. Also I'm looking for a way to highlight some lines of the code.
Is there a way to change the forecolor and backcolour of a piece of text inside a textbox or a rich textbox?
Select the shape or text box. On the Drawing Tools Format tab, click Shape Fill > More Fill Colors. In the Colors box, either click the color you want on the Standard tab, or mix your own color on the Custom tab. Custom colors and colors on the Standard tab aren't updated if you later change the document theme.
Select the text that you want to change. On the Home tab, in the Font group, choose the arrow next to Font Color, and then select a color. You can also use the formatting options on the Mini toolbar to quickly format text.
I do not really know what you want to do so here are some options.
If you want a step by step tutorial on how to write a syntax highlighting control, you can read these articles:
For a basic syntax highlighting control written in VB.NET, see this article: Color Syntax Control (VB.NET).
There are two very good options if you want a fully-fledged syntax highlighting control. These are:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With