Results 1 to 5 of 5

Thread: How Can I Change The Forecolor Of Richtextbox?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    14

    How Can I Change The Forecolor Of Richtextbox?

    Hello,

    how can i change the font colors of the richtextbox control. it has selcolor but it doesnt have foreclor. is there a way to change the color of the all text in the richtextbox. Also when i try to use CommonDiloag.ShowFont it says no fonts installed how can i fix that. Thank you very much

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Use .SelColor. If there is a selection, it will colour that, otherwise it will colour the whole lot

    As for the fonts, you have to do this
    VB Code:
    1. CommonDialog1.Flags = cdlCFBoth
    2. CommonDialog1.ShowFont
    Flags can be as shown, or cdlCFPrinterFonts or cdlCFScreenFonts

  3. #3
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Try this to change the font color:

    VB Code:
    1. Dim oldsel As Integer
    2. oldsel = RichTextBox1.SelStart
    3. RichTextBox1.SelStart = 0
    4. RichTextBox1.SelLength = Len(RichTextBox1.Text)
    5. RichTextBox1.SelColor = vbBlue
    6. RichTextBox1.SelStart = oldstart
    Baaaaaaaaah

  4. #4
    Frenzied Member Mega_Man's Avatar
    Join Date
    Mar 2001
    Location
    North of England, South-East of Iceland
    Posts
    1,067
    Check out my new web site!!
    Not bad for a start but edit the page and take out the server side script that causes the geocities popup. It is one pain in the a$$

    Mega.
    "If at first you don't succeed, then skydiving is not for you"

  5. #5
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Originally posted by Mega_Man


    Not bad for a start but edit the page and take out the server side script that causes the geocities popup. It is one pain in the a$$

    Mega.
    I can't take out the script because it's "server side". I can buy my own domain name if I have at least one commercial product
    BTW, Thanks for your comments
    Baaaaaaaaah

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