How to create Syntax Highlighting Text Box
Take ScintillaNet and take one of the predefined lexer or write your own one (example of IniLexer). If you're going to adopt the sample you should also take a look into this discussion.
Making the Syntax highlighting textbox written in C#
http://www.codeproject.com/KB/miscctrl/FixingTheCode.aspx