CodeItBetter Programming Another VB Programming Blog

How to convert RGB value to Long

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
'Math - How to convert RGB value to Long

Option Explicit
 
Private Sub Main()
    R = Val(InputBox$("Red Value"))
    B = Val(InputBox$("Blue Value"))
    G = Val(InputBox$("Green Value"))
    Lng$ = B * 65536 + G * 256 + R
    MsgBox Lng$
End Sub
Filed under: Math Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.