This project shows how to host the Ace editor in a regular C# Winforms app. ACE is supposed to be used in a web page, but this source will show you how to use in regular C# Winforms.
Ace is an embeddable code editor with syntax highlighting. You can find out more about it here: http://ace.c9.io/#nav=about
Why do this? Because it's hard to find a free WinForms editor control with a BSD license. The ace javascript library, and this user control are both BSD.
Here is a screenshot of Winforms sample app. The dark "control" is the usercontrol from this project. You can resize the usercontrol and place it however you like. Also, you can load it from a text string and read the text out into another string.
You can also control the "theme" and the computer language that syntax-highlighted (this sample is javascript)...