View Full Version : Converting Backcolors


Finks
05-16-2002, 05:04 AM
Does anyone know, or if it's at all possible, to split a forms backcolor (which is stored as a Long) into it's RGB componenets ?

KKilfoil
05-16-2002, 07:23 AM
There may be a better way to get this but...

The MSAccess long color value is equal to
R + Y*256 + B*256^2

So you should be able to 'extract' the respective values using mod and int.

Finks
05-16-2002, 09:38 AM
Thanks, that's exactly what I was after.