It's like this is all I say
But, LEARN THE LANGUAGE FIRST!
I'm sorry but that's the best answer I can give.
And I don't thinks anyone else is going to help you.
But if anyone can help you it's @Hassan, he made his own language.
Hey guys
im currently coding a text editor with syntax highlighting. Im using the Digital Rune Texteditor (DigitalRune Text Editor - A Text Editor for .NET Windows Forms.) for that.
Can someone tell me, how to make my own syntax highlighting for my own language?
Thanks
It's like this is all I say
But, LEARN THE LANGUAGE FIRST!
I'm sorry but that's the best answer I can give.
And I don't thinks anyone else is going to help you.
But if anyone can help you it's @Hassan, he made his own language.
Uuh..srywhat?!
Ive been programming in VB now for about 3 yearskk?
Its just the first time im using this control.
Okay, then ask @Hassan, he might know.
Multiple ways of going about it, finding the most efficient is the hardest part, and making it foolproof is also difficult. If you're triggering syntax highlighting on the "textchanged" event, you're going to have to do some filtering about where to start and finish applying the syntax highlighting, as a textbox with a hundred lines of text will start lagging insanely if the whole thing is being parsed for syntax highlighting EVERY TIME someone types.
First step is to obtain a list of the words you want to highlight, you can find a lot of them on MSDN if you search for stuff like "Visual Basic Keywords List MSDN" or something like that.
Next you've got to add that list somewhere into your project (either through My.Settings, or even in a .txt file accompanying the project and to be loaded into a list at runtime.
After that, my idea would be to create a dictionary(Of String, Color) for each of the keywords, to add the color of their highlighting associated with the keyword.
Now you'll need to write some method that takes an input string, and a richtextbox control and does all the syntax highlighting for that given string.
That's really it.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
It looks like you dont know DigitalRune, but thanks. I already got it working
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)