Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Display Color Text In Richtextbox.

I m coding a program using vb2005.

For eg I have 2 strings:

Proteinseq: GHYYUJIARR

So, in the richtextbox, the following is shown:



(The characters match with a L will appear as orange, E will appear as purple, H will appear as green.)

G will appear in orange, HYY will appear in purple, UJI will appear in green and ARR will appear in orange

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Keep The Color Of Richtextbox.text On Copy To Another Richtextbox
So, i have 2 richtextbox controls and the text in one of them is colored with different colors (per words like vb editor).When I copy the text to another richtextbox, I lose the colors.How can I keep the colered words?

Does anybody experienced this?


Richtextbox Text Color
how do you change the text color in a richtextbox....?

I want to have five numbers colored black and the last number to be red.

I tried the following and it doesn't work


'Print out numbers
RichTextBox1.SelColor = vbBlack
RichTextBox1.Text = RichTextBox1.Text & A & " " & B & " " & C & " " & _
D & " " & E & " "
RichTextBox1.SelColor = vbRed
RichTextBox1.Text = RichTextBox1.Text & F & vbCrLf

Text Color In Richtextbox
I set richtextbox.textRTF to the following:

ed255green0lue0;}{cf1 N}abc}

the text box displays N in red and the abc in black. which is what I expected.

however after this when I load the same content again all the charactes become red.

anyone know why is that?


Color Text In RichTextBox
How do I apply a color to a highleted text in the RichTextBox?

Color An Text In RichTextBox
Is it possible to make different collor on some part of a text in a RichTExtBox

Change Color Of Text In Richtextbox
I'm using a richtextbox as a regular textbox (I'm not doing any formatting). I'm using a rtb because it can handle much more text than a regular textbox.

But there's no setting to change the color of the text like in a regular textbox.

So, how would I go about changing the color of the text?

I'm just using it like
richtextbox1.text = "text string"


Detecting Text Color In RichTextBox
If the color of the text inside RichTextBox is more than one, is there away by which VB can detect the color of words inside RichTextBox?

RichTextBox Dynamic Text Color Changing
Hello all! I've done a great deal of searching and can't seem to find exactly what I'm looking for.

For starters, I'm creating a text editor tool that is to edit scripts for video game editing. To help the user, I would like the RTB control to dynamically color codes as you add them in. I created a version of this program before and the last time I did, it colored the RTB after you saved, or opened a file, it never did it dynamically. Essentially what I want is for the control to look for key characters such as "$" as defines a command for the script, "//" which defines a comment, and then "*.smd" which defines a file the script is looking for.

A for instance is if I type a "$" I want the RTB to change colors to blue, then if i finish the "$statement" with a space, it goes back to the default color. and "//" will change to a green, until a line break.

Any help would be greatly appreciated. Thanks in advance.

Changing Richtextbox Text Color By Line #
Is there a way to change the text color in a richtextbox by the line number?
I would like for text to highlight within the RTB without user intervention.

Thanks for any help

Richtextbox Text Color Send/receive
hi all, still working on the chatroom here, im curious to know is it possible for me to have a color picker on a realtextbox, user picks green for example and when it sends the message to the server and server sends to all clients in chatroom that everyone sees the text in green, and if someone sends in blue then that line in the chattext is blue, i.e. similar to a yahoo chatroom where users can pick the color of there text and it sends to all the way they do it.. Thanks!

Richtextbox Text Changing Color When Font Size Changes

I have code to change the font size of the text in my Richtextbox, but when it does change the font size, it also changes the color of whatever the text currently is to black. In other words, if the text is currently red or blue, it will change the text to black.

combo1.additem "8"
combo1.additem "9"
combo1.additem "10"
combo1.additem "11"
combo1.additem "12"
combo1.listindex = 0

Private Sub Combo1_Click()
RichTextBox1.SelStart = 0
RichTextBox1.SelLength = Len(RichTextBox1.TextRTF)
RichTextBox1.Font.Size = Combo1.Text
End Sub

Anyone have any ideas why this might be happening ?


Need To Display Hindi Or Bengali Text For Access Database To VB RichTextBox
I am using access database, where I store Hindi or bengali text. Now using VB I want to display the text in RichTextBox.
But I am getting "?????????".
I am not finding any charset of Hindi or bengali.

Can you please help me and let me know how to solve this problem?

Removing Ansi Escape Sequences For Display In A Text/richtextbox
Hello everyone, i'm having a real hadache adding ansi colouring into my telnet application, currently I am simply trying to get VB so it finds the escape sequences and replaces them with "" (obviously I can make it change colours and so on once i've made sure it finds the codes correctly.

This is the code I have so far, i'm not a B expert and have learned it mainly from the manual so it may be i've done something really silly....:

(Oh i've added more comments below this section...)

Private Sub AxWinsock1_DataArrival(ByVal sender As System.Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles AxWinsock1.DataArrival
Dim strdata As String
Dim ob As Object
Dim strtest As String
Dim i As Integer
Dim ln As Integer
Dim pos As Integer
Dim code As String
Dim misc As String
Dim j As Integer

' ALL Ansi escape sequences start with this...
ESC = Chr(27)

' convert the received data so we can work with it...
strdata = System.Text.Encoding.UTF8.GetString(ob)
strtest = strdata

ln = Len(strdata)
j = 1
i = 1
pos = 1
' Outside loop to make sure we run through the entire received
' string...
Do Until i = ln
pos = InStr(i, strdata, ESC, CompareMethod.Text)
If pos = 0 Then Exit Do
code = ""
j = 1

' Ok now we've found one we skip through the string until we
' find an "m" I know this wont work for split ansi codes BUT
' I am testing this on a system that doesn't use split codes.

Do Until Microsoft.VisualBasic.Right(code, 1) = "m"
code = Microsoft.VisualBasic.Mid(strdata, pos, j)
j = j + 1

' This next textbox was added for debugging its shows the codes
' that this lot finds...

' Ok now we use replace to simply remove the code we've found
' and replace it with ""(basically blanking it out)

strdata = Replace(strdata, code, "", i, 1, CompareMethod.Text)

' As far as I understand it because we've replaced a section of the
' string with "" it will then reduce the length of the string so we need
' to make sure we have the current length...

i = i + 1
pos = 1


End Sub

Hopefully you guys can see what i'm trying to achieve here as I said this is pretty much my first serious bit of VB so any suggestions would be greatley appreciated.



Display High Color Graphics On Low Color App Server
I have put up with this problem for a very long time and now I just can't stand it anymore because it limits the graphical design of my apps. I've read some similar posts on this forum, but none seem to be exactly what I'm experiencing. So here goes...

Most of my apps currently have a gray background on ALL objects because that is one of the colors that can be displayed correctly on our app server which I think is set to 256 colors. My machine is set to "High Color 16 Bit". When I add our company logo or any kind of image to an object and run it on our app server, it loses its depth and ends up displaying the image in very basic colors. Recently, we installed a 3rd party app (I think it was written in some kind of visual cobol) and I noticed that the graphics in this app look very rich. (Which ticks me off!)

Is there a way that I can display "High Color" on a "Low Color" setting? There must be.

I've attached two samples for comparison. Hopefully you can see the difference. They are screenshots from my PC and from our app server.

Thanks in advance!

Changing Color Of The The Highlight Color And Highlighted Text Color
does someone know of a snippet where it shows how to change the color of the hightlight bar/color and the highlighted text,i am doing something in a rtb and i hate when colors are bouncing all over when highlighting it and wanna set two main colors for highlighting but cant seem to find a snippet

Form Text Color Same As Excel Cell Text Color
It seems like this must be easier than It is...

But I basically have a text field on my form that is filled with an excel cell value. OK no problem.

I want to add color formating, but to do this I need the form to be able to read the excel text color and set the form text color to the same.

AND the excel workbook has a custom pallette.

I am testing both a regular text box and rich text box.

If the excel font is red and I use:

RichTextBox1.SelColor = xlApp.Selection.Font.Color

It renders the text white??

Any ideas

Thanks in advance

Color In Richtextbox
In a program i'm making i want the user to be able to choose the color they want the the font of the richtextbox to be on each entry. I have the richtextbox set to multiline and option buttons where they can select the color they want. here is my code.

Private Sub Addtext(ByVal text As String, ByRef box As RichTextBox)
box.text = box.text & text & vbCrLf
End Sub

Private Sub Command1_Click()
If Option1.Value = True Then
RichTextBox1.SelColor = &HFF&
ElseIf Option2.Value = True Then
RichTextBox1.SelColor = &H80FF&
RichTextBox1.SelColor = &H0&
End If

Addtext "Hi", RichTextBox1
End Sub

The color of all the text in the text box changes instead of just the entry. (Instead of having hi as the text entered i'll have a variable, i'm just trying to get the color to work in this program). I would appreciate any help.

Help With Richtextbox Color
Hey, i attached a pic..can somebody show me how to color the person`s name thats speaking red, should i do it client or server side,

Jack - ive attached a pic

'server side

Public Sub SendChat(Index As Integer, msg As String)
On Error Resume Next
Dim a As Integer 'Counter

Call ChatLog(Index, msg)

For a = 1 To MaxUsers
If User(a).Status = "Playing" And _
User(a).Mute = False Then
frmMain.wsk(a).SendData Chr$(8) & "[" & User(Index).UName & "] - " & msg & vbCrLf & Chr$(0)
End If
Next a

End Sub

'clients side

Public Sub ShowChat(Msg As String)
Const iMaxChar = 2500
Dim iRemove As Integer

With frmMain.txtOutput2
If Len(.Text) + Len(Msg) > iMaxChar Then
iRemove = (Len(.Text) + Len(Msg)) - iMaxChar
.Text = Mid$(.Text & Msg, iRemove)
.SelStart = Len(.Text)
.Text = .Text & Msg
.SelStart = Len(.Text)
End If
End With

End Sub

Color In RichTextBox
I want to parse a string in my richtextbox and then change the color of the specific words like the code editor of Visual Basic. Help !!!

How would I change the color of a string when it is typed into a richtextbox, like an HTML editor would do?


RichTextBox And Color
The situation is this: I'm programming a MU* client, a text-based game software client. When text is sent by the MUSH to the client, it is sometimes surrounded by ansi codes (Like ). From this position in the text-stream until it reaches "" code (the end-wrapping ansi tag), the selected text must be dyed a certain color.

I'm using RichTextBox to show the text but I've already given up on using SelStart, SelLength, SelColor etc. to parse the color and I'm looking to use RTB codes (or something better!) to do it. If you have any ideas, please reply because i'm stuck. This is the code I have so far, prefixed by some exampls of ansi codes:
Public Const ANSI_BLACK = ""
Public Const ANSI_BLACK = ""
Public Const ANSI_RED = ""
Public Const ANSI_GREEN = ""
Public Const ANSI_YELLOW = ""

Friend Sub ReturnData(sData as String)
Dim sBuffer As String

   sBuffer = Replace(Replace(sData, ANSI_BLACK, “{{colortbl;
ed0green0lue0;}{cf1 ") , ANSI_NORMAL, "}}")

   txtOutput.TextRTF = txtOutput.TextRTF & vbCrLf & sBuffer

End Sub

I'm perfectly aware of the fact this doesnt work, but I don't know why and I don't know what the best thing to do would be. If anyone could help, I'd really appreciate it and I'd name my first son after you.

"There is no spoon."

Color In RichTextBox
I have never used a RichTextBox before, so I am struggling.

What I'm trying to do is colorize a string.

My string looks like this:

^1Hello All, ^2How are you^3?

The ^ followed by a number indicates the color change.

1 = red, 2 = blue, 3 = green

My string should then look like:
Hello All, in red
How are you in blue
? in green all concatenated together...

Anyone know how to go about doing this?


RichTextBox Fore Color
how can I set the fore color of RichTextBox?
I can set the back color to black, but can't set the fore color to white!

Richtextbox Font Color?

how can i write a word in red i an richtextbox1 and the rest in black?


Richtextbox Color Problem.....?
Hello everybody,

I have a richtextbox with the following text in it:
Name: John Doe
What I'd like to do is I want "Name" to be colored red and the "John Doe" will remain black. Can anyone show me a sample codes on this?


Richtextbox Color Probles, Please Help
ok i have a program that lets users chat in a game and adds the action to the richtextbox when they do things in the game, kinda like a log, but i also want certin words to be colored now i have it workine fine except 1 problem. each time i add a new line to the richtextbox the old coloring on the previous lines goes away. here is the code. so in this example if it finds the word "Game:" then it makes it turn green.

Public Function Chat(text)
Dim Game As Integer
Dim Before As Integer

Before = Len(FrmDuelArea.ChatBox.text)
ChatBox.text = FrmDuelArea.ChatBox.Text & text & vbCrLf

Game = InStrRev(FrmDuelArea.ChatBox.Text, "Game:")
If Game > 0 Then
ChatBox.SelStart = Before
ChatBox.SelLength = 5
ChatBox.SelColor = vbGreen
End If

End Function

now it seems to be not doint it b/c it redoes the text box each time. changeing the value of the text to the value of the text + the new text and its not keeping the colors of the origional text. i have tried changing

ChatBox.text = FrmDuelArea.ChatBox.Text & text & vbCrLf


ChatBox.text = FrmDuelArea.ChatBox.TextRTF & text & vbCrLf

and it just displayes the RTF code in text and dosn't display it in colors. i've also tried

ChatBox.textRTF = FrmDuelArea.ChatBox.TextRTF & text & vbCrLf

in which case nothing is displayed, does anyone know how i can fix this?

RichTextBox Background Color?
Is there any way to change the background color of the selection in a RichTextBox?

(See attached file)

RichTextBox Color Problem
Hey guys,
i have a large amount of text in my richtextbox (RTB) so I have to use scroll bars. The problem is if I try to highlight any instance of a certain word thruout the whole text, the scroll bars jump around and even tho I return to the original insertion position, the scroll bars could still be offset from original.

Is there a way to force RTB to not scroll when something out of "visible range" is selected (for example, using txtRTB.Find "mystring" to highlight)?

Since I couldn't find a solution, I tried to edit the colors directly in the .TextRTF instead, however the following code has no affect and doesn't update the RTB, .TextRTF stays the same

P.S. .TextRTF has instances of "mystring", I double-checked and RTB's color table is fine also:
{colortbl ;

RTFStr = .TextRTF
RTFStr = Replace(RTFStr, "mystring", "cf1 mystringcf0 ")
.TextRTF = RTFStr

.TextRTF stays the same, all "mystring" are still "mystring", not the wanted "cf1 mystringcf0 ", however if i replace "mystring" with "newstring", it does change fine, so it has something to do with changing "cf#" flags, in this case cf1 and cf0; anyone knows how to force the RTB to accept actual RTF code changes?


RichTextBox Color's Manipulation???
OK, my project is based on data arrival from an IP, used winsock...
Now I have constant data arrival, so it's not very clear to see what I receive and what I sent to server.

So I would now to make changing color off lines in richtextbox, but I dont know how to do it

example, if I know some text that is constantly use in some line's could I make it then?

22:11:31.108 root: server sent <- data sent ok
22:19:07.578 root: client request handler ok (time 0.2243 seconds)
22:19:07.576 root: server sent <- data sent ok (time 0.2214 seconds)

so now I wish to change line color if I find word in rtf ( server sent )
22:11:31.108 root: server sent <- data sent ok

and if incoming word is ( client ) then
22:19:07.578 root: client request handler ok (time 0.2243 seconds)

so in rtf will be

22:11:31.108 root: server sent <- data sent ok
22:19:07.578 root: client request handler ok (time 0.2243 seconds)
22:19:07.576 root: server sent <- data sent ok (time 0.2214 seconds)

Please help

Color Lines Of RichTextBox
Hi, I have this richtextbox where I'd like to color an entire line of it a certain color whenever I see a certain word.

For example, if I type in "Hello, how are you today?" Let's say "you" is the word I'm looking for. When it finds this word, I'd like it to color the line blue, but the actual word another color like red.

Like this. "Hello, how are you today?"

Anyone have any ideas? I know I need to use SelLength, SelColor and what not, but not sure how.

Richtextbox Color, And 2 Strings
sorry to bother use again, im haveing a bit trouble with richtextbox. what it is i have 2 strings that change all the time, and now what i want to be able to do is have both them strings diffrent color in the richtextbox like this, i want it in the same line like

test data

i cant seem to figure it out? can any of u guys help me out? thanks..

Alternative Color For RichTextBox
I want to make a chat program and I use RichTextBox to display the conversation

how to display it in Colors .. for example my color is red,, and the other is blue


RichTextBox1.Text = RichTextBox1.Text & myText & vbCrLf
RichTextBox1.Text = RichTextBox1.Text & comingText & vbCrLf

RichTextBox Color Question
I would like to make my programm change text colors when i write codes like this in my RichTextBox1: $G$

And $G$ have to change the next words into Green
So actually directly when i typ $G$ in the text it has to set the fontcolor to green and remove/hide the code
How to do that?

Color Syntaxing With RichTextbox
I have been working with Richtextbox lately and I have come to a conclusion that it is not that programmer friendly at all. But I have a question cause I know of someone who has done this. How would I go about a way to color syntax words in a richtextbox. Say I open a file and its html and all the html syntax is color coded. Or I start to type in it with html commands and they are colorized based on their syntax. If anyone can help me out. I need proper methods to do this, I already know about highlighting the text and coloring it. Thats to slow and if yur typing while its colorizing it, it gets messed up.

Thank you.

How Would I Color C++ Code In My RichTextBox? Is There An OCX?
How would i color C++ code in my RichTextBox? Is there an OCX? Or whatever..
Please help!!!

RichTextBox Color Preservation
I currently have the following code

private Sub Command1_Click()
RichTextBox1.Text = RichTextBox1.Text & vbNewLine & Text1.Text
RichTextBox1.SelStart = InStr(len(RichTextBox1.Text) - len(Text1.Text), RichTextBox1.Text, Text1.Text) - 1
RichTextBox1.SelLength = len(Text1.Text)
If Option1.Value = true then
RichTextBox1.SelColor = vbRed
RichTextBox1.SelColor = vbBlue
End If
RichTextBox1.SelLength = 0
End Sub

(where option1 says red and option2 says blue)
(the way it works is you type text in Text1, and it adds that to RichText1, in the selected color)

Eveytime I click command1, the whole textbox resets itself to black, and only the last thing i typed in has any color. What do I need to do?

RichTextBox Will Not Display My Formatting
Unlike most of the posts on this topic, I'm not adding an editor to my program, or allowing the user to enter any text at all. All I want to do is display some premade Help files in RichTextBoxes when the program loads.

I downloaded the RichTextBox Tutorial from this site, but following its directions doesn't seem to be working for me.

I have added the Microsoft RichTextBox 6.0 Control to my program... I added a RichTextBox to my form and then I tried out the line from the tutorial:

Dim sRTF As String
sRTF = {{colortbl;
ed255green0lue0;} Visual {cf1 Basic} Rules!}
RichTextBox1.TextRTF = sRTF

But when my form loads the word Basic is not red.

I also tried making an RTF file with a variety of formatting options, saved it, then ran the line:

RichTextBox2.LoadFile "C: est.rtf", 0

But when it loads up everything is plain text except for the bullet points, those seem to come through fine, but nothing is Bold, Underlined, different font size, or different colors.

I don't understand what I might be doing wrong here. I assumed the simple line from the tutorial would at least work where my more involved files failed, but I can't even get that to display properly.

Any ideas what I might be doing wrong here?

How To Display Background In RichTextBox
Hello , all

If any one Know how to display background image in richtextbox
with ability to write on it .
thanks for all

Dynamically Changing Color In A RichTextBox
Hey guys,
I'm working with ansi color so certain recieved codes such as say [31m for example should prompt a change in color in my output. What I'm trying to do is have my rich text box switch to a new color when the code is hit and continue with this color until it hits another code to switch to a different color. I can't find a way to have a Rich Text Box allow me to dynamically change in this way; select seems an ill choice because I never know the length of the string thats going to be in a specific color and I can't figure out another way to do it. Thanks in advanced...

Richtextbox Font Color Not Changing
ok, i cant seem to get the color to change for me

RichTextBox1.SelColor = vbBlue

all the other stuff works

RichTextBox1.Font.Italic = True
RichTextBox1.Font.Name = "Comic Sans MS"
RichTextBox1.Font.Size = 20
RichTextBox1.Font.Bold = True
RichTextBox1.Font.Underline = True

but the color isnt firing.

Mysql Color Retrive In RichTextbox
Can anyone tell me how do i change individual string from mysql to different colors ?

VB Code:
Public Sub noticeboard()Dim SQL As StringDim conn As ADODB.ConnectionSet conn = New ADODB.Connection Dim rs2 As ADODB.RecordsetSet rs2 = New ADODB.Recordset conn.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _           "Server=localhost;" & _           "Port=3306;" & _           "Option=131072;" & _           "Stmt=;" & _           "Database=mydb;" & _           "Uid=eugene;" & _           "Pwd=eugene;"   SQL = "SELECT DATE_FORMAT(noticeDate, '%d-%m-%y') as noteDate,notice,UserName FROM notice ORDER BY noticeId DESC LIMIT 2"rs2.CursorLocation = adUseClientSet rs2 = conn.Execute(SQL)  txtMySQL.Text = "" Do Until rs2.EOF    With rs2                'txtMySQL.Text = txtMySQL.Text & "[" & !notedate & "] - " & !UserName & " - " & vbCrLf & !notice & vbCrLf & vbCrLf        With txtMySQL        .SelColor = vbRed ' down here        .Text = !notedate        .SelColor = vbBlue        .SelText = !UserName        .SelColor = vbGreen        .SelText = !notice                End With                    rs2.MoveNext    End WithLoop End Sub

Color Numbers In Richtextbox(solved)
man this a weird one I gonna try to explain it I was just wondering how to fade a word in richtextbox, using numbers color is it posible? I mean lets say blue is represented by 255 200 255

so every letter the number will go up or down

Richtextbox Auto Color Change
I was just wondering inm any of you know how to go about changing the color of a word that is typed for example if the word i was begiuning to type was steamboat and the first 4 letters where typed "stea" then the text would change to red and if the user sppelt another word out of it like steap then it would go back to black?

This is really important for some syntaxing im doing for an editor so all help is greatly appreciated.


Find And Color Words In RichTextBox - Help!
I wanted that my RichTextBox will be able to find specified words and then color them with a special color for that word.
The code i'm using is doing the work when the user gets off of the line (By enter, up or down), and then if he finds words from the arsenal i gave em he just color them.
The problem is that if i'm going back to edit the colored line the it will color whatever i typed with the same color. Exmaple:

<Line> Test </Line>

If i'll edit that line from the "<Line>" word it will look like this

<Line>edit Test </Line>

I want to change my code so if i'm editing a colored line/word it will color the specified words, but not the 'simple' words that he cant find. I hope u guys got me
This is the code

VB Code:
Public Sub ColorString()Static nOldLine As LongStatic blnBusy As BooleanDim nCurrentLine As LongDim nSelStart As LongDim nSelLen As LongDim nPos As LongDim sSelText As StringDim nLineIndex As LongDim TagsCount As IntegerDim Color As Long'since we change the SelStart property several time here'this will call the SelChange event over and over'and we dont want that. So we use the blnBusy variable'to exit this sub if we are still in it.If blnBusy Then    Exit SubEnd IfblnBusy = TruenSelStart = Main.ScriptText.SelStartnSelLen = Main.ScriptText.SelLengthnCurrentLine = SendMessage(Main.ScriptText.hwnd, EM_LINEFROMCHAR, nSelStart, 0)If nCurrentLine = nOldLine Then    'since we are still on the same line    'we dont change anything    blnBusy = False    Exit SubEnd IfLockWindowUpdate Main.ScriptText.hwndnLineIndex = SendMessage(Main.ScriptText.hwnd, EM_LINEINDEX, nOldLine, 0)If nLineIndex <> -1 Then    Main.ScriptText.SelStart = nLineIndex    Main.ScriptText.SelLength = SendMessage(Main.ScriptText.hwnd, EM_LINELENGTH, Main.ScriptText.SelStart, 0)    sSelText = Main.ScriptText.SelText    TagsCount = UBound(Tags)    For i = 0 To TagsCount        Do            nPos = InStr(nPos + 1, sSelText, Tags(i))            If nPos Then                MsgBox nPos                Main.ScriptText.SelStart = nPos + nLineIndex - 1                Main.ScriptText.SelLength = Len(Tags(i))                Color = Color2Set(i)                Main.ScriptText.SelColor = Color            Else                MsgBox nPos                'Main.ScriptText.SelColor = vbBlack            End If        Loop While nPos > 0    Next iEnd IfMain.ScriptText.SelStart = nSelStartMain.ScriptText.SelLength = nSelLennOldLine = nCurrentLineblnBusy = FalseLockWindowUpdate 0End Sub

Treeview And RichTextbox Scrollbar Color
I need to change the Treeview and RichTextbox Scrollbar Color, Some code please!!!! Thanks....

Richtextbox.. Using String To Change Color
hello.. i have a rich text box.. and i have a string like

&010125032&TESTING AND STUFF &110028016&Yep it works

ok, now i need to get the RGB values out
(all 11 char each)..

so i need to make sure my first code is an 11-char string starting with & and ending with & .

TAKE that color.. change the text color of the RTB.. then ... DELETE the color code we just used from the string.. insert all the text before the next 11 digit color value inside of the RTB...

then, do it again..

find part of the string that is 11 char start & end with &
1) use the color code to change the RTB color..
2) delete color code
3) put in all text before the next COLOR code
4) do til no more color codes

i know it sounds like alot.. but i hope you can just see what i am trying to doing..

thank you for any help

Change Default Color In RichTextBox...
Does anoboby knows how to change the default color of the text in a RichTextBox ?


Changing RichTextBox&#039;s Selection Color
Hello everyone,

Does anybody know how to change the rich text box's selection color? (By default it's black) How about hilighting text?

Any suggestions appreciated,

Copyright 2005-08, All rights reserved