Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Color in textbox

Status
Not open for further replies.

pkailas

Programmer
Jun 10, 2002
555
US
How do I change the text color at run time in a textbox?
 
Private Sub Command1_Click()
Me.Text1.ForeColor = vbBlue

End Sub
 
Is there a way to implement this so that only certain parts of the text are colored? Similar to ANSI coloring?
 
I need a text box that supports background colors as well... I'm thinking to try the vbalRichEdit control
 
'========Back/Text color changeing ========'
'========When ever you are typeing========='

Private Sub Text1_Change()
Text1.BackColor = QBColor(Rnd(3) + 6)
Text1.ForeColor = QBColor(Rnd(8) + 5)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top