Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB.NET RTB Syntax highligting.

Posted on 2003-11-28
12
Medium Priority
?
626 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:Fahad Mukhtar
ID: 9841549
0
 
LVL 19

Expert Comment

by:Fahad Mukhtar
ID: 9841566
0
 

Author Comment

by:flosoft
ID: 9841689
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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 1

Expert Comment

by:RussGreen
ID: 9843112
0
 

Author Comment

by:flosoft
ID: 9843960
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
ID: 9844747
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
 
LVL 1

Accepted Solution

by:
RussGreen earned 1200 total points
ID: 9844757
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
ID: 9845319
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
ID: 9845554
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
ID: 9846541
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
ID: 10279728
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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:…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

885 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