[HELP] Code Hilighting In RichTextBox-VBForums
Results 1 to 4 of 4

Thread: [HELP] Code Hilighting In RichTextBox

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2011
    Posts
    62

    Question [HELP] Code Hilighting In RichTextBox

    Hi, i want to have syntax highlighting for Java in RichTextBox1.

    When the user entres "//" (without quotes), i want the "//" to turn green, while the rest of the text stays black.

    i've started with:

    If RichTextBox1.Text.ToLower.Contains("//") Then
    'do something
    End If

    I hope i make sense, thanks for your help. (:

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    88,656

    Re: [HELP] Code Hilighting In RichTextBox

    You should visit our VB.NET CodeBank forum and sort by Thread Starter, then page to find threads by Icyculur. You'll find one related to syntax-highlighting.

    2007-2014

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2011
    Posts
    62

    Re: [HELP] Code Hilighting In RichTextBox

    I found the post by "Icyculyr", and it seems deathly complicated. He hasn't posted a reply since 2008 saying he ever got it working or not. /:
    What is "regex"?

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    88,656

    Re: [HELP] Code Hilighting In RichTextBox

    Quote Originally Posted by iamanoob View Post
    What is "regex"?
    What is "regex"?

    2007-2014

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.