Display SQL Parsed string with reserved keywords in color.
Hi
I am developing a SQL-DMO application where i need to display SQL Scripts with reserved keywords in color like the way Query Window of Sql Analyzer displays. I am using sqlparser.dll to parse the script into RTF format much like this
Now my problem is neither Textbox nor RichTextBox control is able to display it the way i want. I also tried word document thru VB code to display this text, but it displayed without color.
Can anybody know which control/component/library SQL Query Analyzer uses or is there any other control that i can use.
Re: Display SQL Parsed string with reserved keywords in color.
Here... this should do the trick... I wrote this a few years back.
You'll just need to finish setting up for the SQL language. To see how it is done you can also refer to the inbuilt functions SetupForC, SetupForVB and SetupForMATLAB.
One problem with it which I have noticed is that, after pasting multiple lines, it is not so happy... but it still works quite well. Note that to use it in FAST mode you need to have 2 rtf boxes. (One remains invisible and does the colourising whilst the other is presented to the user.)
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.