Make your own free website on Tripod.com

Convert RGB Value To Long

'Add 1 Command Button to your form.
'Insert the following code to your form:

Private Sub Command1_Click()
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

Go Back