Weel, I'm not sure what else I can say about the code, it is rather self explaning.
But here goes:
lngColor is a colorcode ie. 192255012
lngRed is the value of red in the RGB colorcode
lngGreen is the value of green in the RGB colorcode
lngBlue is the value of blue in the RGB colorcode
VB Code:
lngRed = (lngColor And &HFF&) 'lngRed is now the value of red lngGreen = (lngColor And &HFF00&) / &H100 'lngGreen is now the value of green lngBlue = (lngColor And &HFF0000) / &H10000 'lngBlue is now the value of blue
lngRed, Green and Blue are just varibles, in which I store the value, you can choose your own varibles, debug it or whatever.
The code just does some bitwise operations on the number, and retrieves the bits representing the value of the Red Green and Blue value.




Reply With Quote