CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2001
    Location
    Israel
    Posts
    127

    how do i change the color of a found text without highlighting??? please help

    hello all

    I wanted to know, how i change the color of a certain text in a rich text box, without highlighting the word... for example, when using the VISUAL BASIC work area, when a know word such as "function" is entered, the color of it is changed.
    what i did, is used the "find" function to find the word, and then changed it's color, but the highlight stays on the word, and when i type something, the word is replaced with what i type

    Please help...

    Meir


  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: how do i change the color of a found text without highlighting??? please help

    If you are using the RichTextBox FIND method, set its option keyword to 8 to eliminate highlighting of the found word. It's described in MSDN Help under Find Method/RichTextBox (4th parameter on the Find Method)

    John G

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured