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

Need help with design... 1

Status
Not open for further replies.

phaas

Technical User
Oct 11, 2000
5
US
I am trying to design an interface and although this might sound silly to others, I need to have more of a choice of colors besides just vb colors. Is there a way to do this? I have tried adding active control and went thru that whole process with adding components, but I did not see anything. I dont know what all of those controls mean as well so I could have missed something. Can anyone please give a clue on IF i can add more and if so how? I would highly appreciate it. Obviously I'm a newbie. Thanks!
 
In VB6, when you choose a color-related property, the properties box has two tabs -- one for standard windows colors, and another which lets you choose a custom color.

Or, if you know the RGB value for the color you want, you can type it directly into the property. Just prefix it with "&H", and add a "&" at the end so that VB knows it's a hexadecimal number.

In case you're curious, the structure of a color value is (from left to right)

&H -- prefix indicating this is a hexadecimal value
00 or 80 -- zero indicates a custom color, 80 indicates a system color
RR -- Red values, from 00 to FF
GG -- Green values, from 00 to FF
BB -- Blue values, from 00 to FF
& -- indicates this is a hexadecimal value.

So, &H8000000F& is a system color ("Button Face"), and &H00FF00FF& is a custom violet color (FF for Red, no green used at all, FF for Blue).

System colors follow the user's preferences in the control panel. It's always a good idea to use one of these colors, as a too-colorful application makes some users barf.

Chip H.
 
Chip,

I understand that the two tabs come up for standard colors and windows colors but my problem is that there is no custom colors. It is greyed out and not an option. Any other ideas?
 
It sounds like you are trying to develop on a machine with a limited display adapter. Check the PC Hardware and Microsoft: Windows 95/98/ME forums.

ChipH, I loved your response, especially the last line. Excellent advice for all.
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top