Hex Colors - Backwards? And VBConstant bug? 
Author Message
 Hex Colors - Backwards? And VBConstant bug?

I've been doing somework with VB .backcolor and .forecolor properties,
and it seems that VB's hex notation for the colors is backwards.

Normal hex notation should be R G B (ie, Red would be FF 00 00)
VB's notation is B G R (ie, red is 00 00 FF).  Does anyone know the
reason for this? Is this a Microsoft standard that differs from the rest
of the world?

Also, the color constant vbInfoBackground with hex value 80 00 00 18 is
giving me an illegal property value, even if I type the hex value in
directly to the controls.  The other color constants work fine, as does
typing the hex values in directly. Is this a bug? Or is there a reason?

Any thoughts?

Thanks

Jack Zaientz
Iron River Software




Tue, 13 Jul 1999 03:00:00 GMT  
 Hex Colors - Backwards? And VBConstant bug?

Jack,

Quote:
> Normal hex notation should be R G B (ie, Red would be FF 00 00)
> VB's notation is B G R (ie, red is 00 00 FF).  Does anyone know the
> reason for this? Is this a Microsoft standard that differs from the rest
> of the world?

No, this is an Intel standard. Intel processors store low-order bytes
(words) first.

Quote:
> Also, the color constant vbInfoBackground with hex value 80 00 00 18 is
> giving me an illegal property value, even if I type the hex value in
> directly to the controls.  The other color constants work fine, as does
> typing the hex values in directly. Is this a bug? Or is there a reason?

I'm not sure what you are doing here. I do know that 80 00 00 18 is not a
valid syntax. How are you using this?

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com



Fri, 16 Jul 1999 03:00:00 GMT  
 Hex Colors - Backwards? And VBConstant bug?



Quote:
>Jack,

>> Also, the color constant vbInfoBackground with hex value 80 00 00 18 is
>> giving me an illegal property value, even if I type the hex value in
>> directly to the controls.  The other color constants work fine, as does
>> typing the hex values in directly. Is this a bug? Or is there a reason?

>I'm not sure what you are doing here. I do know that 80 00 00 18 is not a
>valid syntax. How are you using this?

vbInfoBackgound (Ox80000018) is the background colour of ToolTips.  I
have used it as the backcolor of a picture box without problem.  Could
it be anything to do with how you are trying to use the colour?
---------------------------------------------------------------------------

| Projects and Support Branch, CIS Division,                              |
| CINCEASTLANT HQ, Northwood, Middx., HA6 3HR, England                    |
---------------------------------------------------------------------------


Sun, 18 Jul 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Color Hex Notation and Possible Bug?

2. counting backwards in hex?

3. VB Colors vs. Web Hex RGB colors

4. Converting RGB-color to HEX color

5. Converting RGB-color to HEX color

6. hex codes for colors

7. Help me convert system color NAMES to hex or RGB VALUES

8. (fwd) Hex color #s in QB

9. Hex color #s in QB

10. HEX values for colors in VB

11. convert commondialog color to hex for html

12. hex-color's -----> vbcolors

 

 
Powered by phpBB® Forum Software