by Justin Coleman (6 Submissions)
Category: Graphics
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 10th September 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Extract the Red, Green, and Blue color values from a Long color ID (like those returned from the Point method)
API Declarations
gcRed = 1
gcBlue = 2
gcGreen = 3
End Enum
Dim strColor As String
Select Case ColorPart
Case gcRed
strColor = Right$("000000" & Hex$(Color), 6)
GetRGBColor = Val("&h" & Right$(strColor, 2))
Case gcBlue
strColor = Right$("000000" & Hex$(Color), 6)
GetRGBColor = Val("&h" & Left$(strColor, 2))
Case gcGreen
strColor = Right$("000000" & Hex$(Color), 6)
GetRGBColor = Val("&h" & Mid$(strColor, 3, 2))
End Select
End Function
No comments have been posted about Extract the Red, Green, and Blue color values from a Long color ID (like those returned from the Po. Why not be the first to post a comment about Extract the Red, Green, and Blue color values from a Long color ID (like those returned from the Po.