RGB Colors

varrey
09-05-2004, 09:08 PM
I select a color using Common Dialog control. Once I select the color how do I get the RGB values of the color.

Please help

Regards

Varrey

OnErr0r
09-05-2004, 09:50 PM
Dim lColor As Long
Dim lRed As Long
Dim lGreen As Long
Dim lBlue As Long

lRed = lColor And 255
lGreen = (lColor And &HFF00&) \ 256
lBlue = lColor \ 65536

webbone
09-05-2004, 09:51 PM
Have you searched in MSDN?

http://msdn.microsoft.com/library/en-us/cmdlg98/html/vbproColor.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmdlg98/html/vbproflagscolor.asp

varrey
09-05-2004, 10:14 PM
Thanks for the help

Regards

Varrey

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum