Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB.NET RTB Syntax highligting.

Posted on 2003-11-28
12
Medium Priority
?
623 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

688 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