Recognising languages

Hi Experts,

I expect this is pretty difficult and way out of my league;

I would like a rich text box to recognise different languages (e.g. XML, HTML, VB). Not extensivley but on a simple scale. What i mean by recognise is convert the text to blue if a type is used (for vb) etc...

I dont want to write loads of code to do this manually. I was wondering if there was any option for this.

I am developing a text editor and would like to give the option to edit files in other formats.

Cheers,

Tom
LVL 3
TommyTwoPintsAsked:
Who is Participating?
 
RamuncikasConnect With a Mentor Commented:
This could be even more usefull:
http://pietschsoft.com/Blog/Post.aspx?PostID=491
0
 
sagacitysolutionsCommented:
Tommy,

Just a thought, If its an existing file you could determine by the file extension. If its a new file
why not allow the user to specify the format they are writing in.
0
 
TommyTwoPintsAuthor Commented:
Hi Saga,

That; i already do.

I was wondering if there was any code out there that i could place in the RichTextBox.TextChanged event that would change colours of words according to types.

I could write the code myself, i was just wondering how to approach this or if it is already avaliable somewhere.

Cheers,

Tom
0
 
TommyTwoPintsAuthor Commented:
Thankyou for you answers;

I've found an xml file to base the styling on. I will smiliar methods shown in your second post Ramuncikas.

Thanks again
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.