CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: colored text

  1. #1
    Join Date
    Apr 1999
    Location
    Michigan, USA
    Posts
    29

    colored text

    How would someone make key words in text appear in a different color like in Visual Studio?


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: colored text

    What text are you talking about.
    Here the code for RTF control.

    private Sub Command1_Click()
    RTB1.Text = "bla-bal word bla-bal"
    RTB1.SelStart = InStr(RTB1.Text, "word") - 1
    RTB1.SelLength = len("word")
    RTB1.SelColor = vbRed
    RTB1.SelLength = 0
    End Sub



    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

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