RGB Functions

vb6 Kuwait
  • 19 years ago

    Function BofRGB(Color As Long) As Integer
       BofRGB = (Color And &HFF0000) / 16 ^ 4
    End Function

    Function GofRGB(Color As Long) As Integer
       If (Color And &HFF0000) > 0 Then
           GofRGB = ((Color And &HFF00) Mod (Color And &HFF0000)) / 16 ^ 2
           GofRGB = (Color And &HFF00) / 16 ^ 2
       End If
    End Function

    Function RofRGB(Color As Long) As Integer
       RofRGB = Color And &HFF
    End Function

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Computer Science is no more about computers than astronomy is about telescopes.” - E. W. Dijkstra