Multiple colors in a textbox in VB

adrien -  
 adrien -
Hello,
I am working with Visual Basic and I would like to know how to put multiple colors in a textbox or richtextbox using a single button in order to achieve the following:

Sentence 1 in red
Sentence 2 in blue
Sentence 3 in green

Thanks in advance

Configuration: Windows 7 / Safari 536.11

2 answers

  1. miro_marou Posted messages 191 Status Member 17
     
    you can do it with the richtextbox ok example in vb6

    richtextbox.Selcolor=vbred
    richtextbox = richtextbox & "blabla"
    richtextbox.Selcolor=vbgreen
    richtextbox = richtextbox & "blabla2"
    1