VS 2008 Changing Font Color Of KeyWords In Textbox-VBForums
Results 1 to 3 of 3

Thread: Changing Font Color Of KeyWords In Textbox

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2010
    Posts
    23

    Changing Font Color Of KeyWords In Textbox

    Hey guys

    I am building a text editor kind of like Notepad++ and I would like to set up the color coder for key words such as And. I will be doing this for VBScript and Java.

    I would like the keywords to change when the file is saved for example, when the user loads a blank document nothing will be color coded but if the document is saved as .vbs the keywords for vbs will be blue and comments ' will be green.

    If anyone can help me out that would be great!

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

    Re: Changing Font Color Of KeyWords In Textbox

    You'll need to use a RichTextBox as the TextBox doesn't support multiple formats. Visit the VB.NET CodeBank forum and check out Icyculur's thread on 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
    Junior Member
    Join Date
    Apr 2010
    Posts
    23

    Re: Changing Font Color Of KeyWords In Textbox

    Thanks, Ill check that out and post back here on how I go.

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.