Results 1 to 2 of 2

Thread: Does anyone know this?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    Dallas, TX
    Posts
    89

    Post

    How do I change part of a RTB control's text color? For instance
    <Andy> hello
    <Andy> how are you?
    I just want to change <Andy> to a different color on each new line?

    Help please...

    ande211

  2. #2
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    Hi, there.
    Put this code on CommandButton click event:

    If lFound < 0 Then 'Find First
    lFound = RichTextBox1.Find("Andy", 0)
    RichTextBox1.SelColor = vbRed
    Else
    'Find Next
    lFound = RichTextBox1.Find("Andy", lFound + 1)
    RichTextBox1.SelColor = vbRed
    End If

    Larisa

    [This message has been edited by LG (edited 01-25-2000).]

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