Solved

VB.NET RTB Syntax highligting.

Posted on 2003-11-28
12
607 Views
Last Modified: 2008-03-17
Any suggestion on syntax highlighting in vb.net utilizing a rtb?

Preferable read keywords, comments etc from a db or xml file, and do fairly quickly. The keywords and comments etc need to be in a db or xml or the like so the keyword list can grow and expand with different languages. I have gotten several ways to work ok, but they seem slow compared to simular things I have used. This would be more of a cut and paste, highlight, and possible a highlight while typing.


Thanks
0
Comment
Question by:flosoft
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 19

Expert Comment

by:Desp
Comment Utility
0
 
LVL 19

Expert Comment

by:Desp
Comment Utility
0
 

Author Comment

by:flosoft
Comment Utility
Looked at them, I am more looking for a decent start to highlighting like the VB6 or VS.Net does with code syntax, keywords etc.


Thanks.
0
 
LVL 1

Expert Comment

by:RussGreen
Comment Utility
0
 

Author Comment

by:flosoft
Comment Utility
No source for how it is done and when pasting in a module's code it seems a bit slow, nice example. Might work and be nice if I could see the source code. guess I'll raise the points to 400.
0
 
LVL 1

Expert Comment

by:RussGreen
Comment Utility
the source is in the workspace. go back to here http://workspaces.gotdotnet.com/codebox and following the link to source control. You might need to apply to join the workspace, thats fine.

It is slow cause there is a big and it colourizes too many times. I'm not happy which is why there is a workspace for it to get some other interested people involved in improving it.

Russ
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 1

Expert Comment

by:RussGreen
Comment Utility
0
 
LVL 1

Accepted Solution

by:
RussGreen earned 400 total points
Comment Utility
The page where you'll be able to get the source code is here...

http://www.gotdotnet.com/Community/Workspaces/fileshare.aspx?id=f012498f-29f8-4e9c-8608-74db65f463fb

Russ
0
 

Author Comment

by:flosoft
Comment Utility
Got the code, I am playing with it a bit trying to implement it in a usercontrol so it can be dropped onto a form, rather than coding it in, once I get that done, I'll see what I can do on performance.

I am still looking a bit for a regex or faster way...wonder how vb and vs do it so fast?
0
 
LVL 1

Expert Comment

by:RussGreen
Comment Utility
it is in a user control? the project will compile into codebox.dll

Will you join the workspace and share your findings?

Russ
0
 

Author Comment

by:flosoft
Comment Utility
If I make any significant changes, I will share them there and post them here, at the moment I am experimenting parsing with regular expressions and using an xml file to store the keywords which is a complete departure from codebox. It seems that perhaps the fastest way would be to write the raw rtf to file on the fly and then load it into a richtextbox, it makes a hard disk hit, but is real quick. Anyways, just a few idea's going on until maybe someone on here can post some code that already is fast at doing this.
0
 
LVL 96

Expert Comment

by:Bob Learned
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: RussGreen {http:#9844757}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now