Coversion of System Colors to true colors 
Author Message
 Coversion of System Colors to true colors

Here's a simple one:

How do I convert VB's System Colors (vbWindowBackground, vbButtonFace) to
their RGB values? I know I read the solution somewhere, but I forgot.

Thanks in advanced,

Eric J. Bryant
Software Developer
I/B/E/S



Wed, 30 Aug 2000 03:00:00 GMT  
 Coversion of System Colors to true colors

I haven't tried this, but a routine like this using the API call to GetSysColor should work.

Sub SysColorToRGB(ByVal SysColor as OLE_COLOR, R as Long, G as Long, B as Long)
    Dim RGBColor as OLE_COLOR

    RGBColor = GetSysColor(SysColor And &HFF)

    R = RGBColor And 255
    G = (RGBColor And 65280) / 256
    B = (RGBColor And 16711680) / 65536
End Sub

:Here's a simple one:
:
:How do I convert VB's System Colors (vbWindowBackground, vbButtonFace) to
:their RGB values? I know I read the solution somewhere, but I forgot.
:
:Thanks in advanced,
:
:Eric J. Bryant
:Software Developer
:I/B/E/S
:
:



Wed, 30 Aug 2000 03:00:00 GMT  
 Coversion of System Colors to true colors

Convert the number to hex triples
bbggrr

For some reason, Micsorost chose to describe red green blue as
green blue red.

The RBG mode is for example used in HTML to specify colors.

Hope this helps

Quote:

>Here's a simple one:

>How do I convert VB's System Colors (vbWindowBackground, vbButtonFace) to
>their RGB values? I know I read the solution somewhere, but I forgot.

>Thanks in advanced,

>Eric J. Bryant
>Software Developer
>I/B/E/S



Wed, 30 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using 256 color Palettes in High/True Color

2. How to change True color pixel to 256 color pixel, @Thanks

3. Mapping Bitmap Background Colors to System Colors

4. Getting the palette color of a system color

5. Getting the palette color of a system color

6. Refreshing the system after the system colors have been changed

7. ImageList and True-Color-Icons

8. True DBGrid and colors

9. True DBGrid and colors

10. True color images thumbnail list

11. Displaying true color graphics in image control

12. Get currently 256 colors true/false ?

 

 
Powered by phpBB® Forum Software