TextBox Control

Setting the text colour

Again, you will normally set the text colour at design time, but if you want to set it at runtime, you can use the same syntax to set the Text Colour by setting the ForeColor property.

Text1.ForeColor = QBColor(Number)

The following code sets the text colour of Text1 to Blue.

Text.BackColor = QBColor(1)

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” - Brian Kernighan