Rich Text Box Color help !
Posted on 2003-10-25
i have a piece of code which will look like this
Private Sub StatusLog(What As String)
With txtStatus ' <--- rich text box
.SelLength = 0
.SelStart = Len(txtStatus.Text)
.SelColor = Configuration.picStatusColor(2).BackColor
.SelText = "[ " & Time() & " ] "
.SelColor = Configuration.picStatusColor(1).BackColor
.SelText = What & vbCrLf
Private Sub Form_Load ()
Private Sub printmsg()
The users may change the color which they want from another configuration form . my problem is when the users have changed the color , how can i apply the color changes to all of the text in the txtStatus ?
It might look like this , in txtStatus
[ 9:00:01 PM ] Welcome welcome <--- before color make changes (blue)
[ 9:00:02 PM ] Welcome <--(blue)
[ 9:00:03 PM ] blah blah blah <----user changes the font color (red)
[ 9:00:04 PM ] blah blha <---- (red)
what i wan to do is to change the blue text into red too ..