VB Syntax Coloring

There are now quite a few code repository programs on the market, and they all implement syntax colouring. This gives the program the look and feel of Visual Basic, but with their own customised interface. This control works by having a list of words that need to be coloured, and then checks the text for an occurrences of this text. It also handles comments and underscores.

Screen Shot

Requirements

This control requires the Microsoft RichTextBox control 6.0 although you could change the design to support an earlier version.

Implementation

The download comes with a full demonstration project which shows you how to change the colours (using the ChooseColour dialog).

Download Zipped Project File 56k



Comments

  • rtb

    Posted by Legacy on 04/30/2003 12:00am

    Originally posted by: Sam

    Excellent example.

    Reply
  • Oracle Syntax colouring inVB6

    Posted by Legacy on 03/11/2003 12:00am

    Originally posted by: arul

    hello sir,

    i am student.
    i want to highlight the Oracle syntax through VB6.
    So please send me the code as soon as possibles.

    thank you.

    yours truly,
    Arul

    Reply
  • K�nnte besser sein.!

    Posted by Legacy on 01/04/2003 12:00am

    Originally posted by: Sinan Tuzcu

    Sehr gut aber k�nnte besser sein.

    Reply
  • Thanks

    Posted by Legacy on 12/29/2002 12:00am

    Originally posted by: G�kşah TAŞY�REK

    good idea

    Reply
  • yes I your give me the rouargh

    Posted by Legacy on 09/09/2001 12:00am

    Originally posted by: pekeo

    yes very good messire
    

    Reply
  • Thank you soooooo much!!!!!!111

    Posted by Legacy on 09/07/2001 12:00am

    Originally posted by: Ice6200

    You are awesome. This gave me an idea for my own highlighter thing. Thanks a lot!!!!!

    Reply
  • Needed .DLL?

    Posted by Legacy on 01/10/2000 12:00am

    Originally posted by: Julian

    is there any special .DLL file, needed by this .OCX?

    Reply
  • i love u

    Posted by Legacy on 10/02/1999 12:00am

    Originally posted by: Rohan

    really cool app. , thnx a lot for it

    Reply
  • Highlighting text by changing background color

    Posted by Legacy on 06/20/1999 12:00am

    Originally posted by: Jake

    None of the highlighting code I've so far seen produces a highlight like Word 97 generates, that is, the background behind the text changes color to yellow. Has anyone succeeded in doing this, either in a text box or rich text box?

    If I create a Word 97 document, type a few words, then highlight one word and save the document in rtf format, the resultant rtf contains "\highlight7" in front of the word. However, this is ignored by the rtf formatter in the rich text box. Any ideas why? Are there different levels of rtf?

    Thanks.

    Jake

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • Live Event Date: November 13, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT APIs can be a great source of competitive advantage. The practice of exposing backend services as APIs has become pervasive, however their use varies widely across companies and industries. Some companies leverage APIs to create internal, operational and development efficiencies, while others use them to drive ancillary revenue channels. Many companies successfully support both public and private programs from the same API by varying levels …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds