Maybe its a good idea to use a RichTextBox..
With this you can have multiple fonts, sizes and colors in one text-box.....
Main Topics
Browse All TopicsHi,
im creating a chat application using winsock, i want the feature where users can pick what colour there text will be when they send some text.
e.g. if i was to pick the colour blue for my text colour when i send the message it will be blue on there screen, and the remote user can also pick a colour of there choice (from the selection i give them).
do i use the standard textbox control or something else (richtextbox)?
how would go about coding this?
(below is my send button code)
Private Sub cmdSend_Click()
wsChat.SendData lblUsername.Caption & " says:" & vbCrLf & " " & txtMessageout.Text
txtrecieve.Text = txtrecieve.Text & lblUsername.Caption & " says:" & vbCrLf & " " & txtMessageout.Text & vbCrLf
txtMessageout.Text = ""
txtMessageout.Text
End Sub
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If you want two different color textx int he same box, you have to use the RichTextBox control. BUT, this control WILL flicker and look bad if there is too much text in the box. I recommend looking for a 3rd party OCX for logging with different colors. RichTextBox does a terrible job of refreshing and will eventually start to flicker and look bad, but it is what you are looking for in terms of different text colors in one text box.
Here is an example:
http://www.dotnet247.com/2
Hi Ravi_243,
This old question (QID 20584781) needs to be finalized -- accept an answer, split points, or get a refund. Please see http://www.cityofangels.co
Business Accounts
Answer for Membership
by: Mikal613Posted on 2003-04-14 at 11:13:56ID: 8328355
txtrecieve.forecolor = vbblue