I wrote some code to create a UserControl that is a syntax-highlighting code editor in Win Forms .NET application.
The "tricky" thing is that I am embedding the ACE HTML editor to do it.
Support syntax highlighting and themes. You can insert text and get text out via code.
Very simple. All BSD license (including the ACE editor).