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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code for Colors (VB)

Status
Not open for further replies.

acct98

IS-IT--Management
Aug 15, 2002
194
US
Does anyone know if there are any other color code out there for VB -- other than the ones mentioned below?



QBColor(color)

The required color argument is a whole number in the range 0–15.

Settings

The color argument has these settings:

Number Color Number Color
0 Black 8 Gray
1 Blue 9 Light Blue
2 Green 10 Light Green
3 Cyan 11 Light Cyan
4 Red 12 Light Red
5 Magenta 13 Light Magenta
6 Yellow 14 Light Yellow
7 White 15 Bright White
 
acct98

Could you use MyObject.Color = RGB(255, 0, 0) instead? This way you can use any RGB color.

Binky ::)
><>
 
Is there a chart out there that will give me the colors and the respective color #?
 
acct98,

Yes and no. I'm not sure how much you would find looking for Access colors. BUT, try looking for HTML RGB values and you will probably get a ton. The thing I have done is open an image with the color I need in a 'Paint' style program. There is usually a tool (eye dropper) that gives you the RGB values.

HTH
Binky ::)
><>
 
You could also use the Forecolor property for a text box. Click the Build (...) button after you have selected the Forecolor property. This will bring up the Color windows color selector. Click Define Custom Colors and create your desired color. When you are done (Click OK), the numerical value will be in the forcolor property box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top