Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleBreak a RGB color into its red, green, and blue components
KeywordsRGB, color, components, separate
CategoriesGraphics
 

Thanks to ToitSoft

 
Public Sub ReverseRGB(ByVal Value As Long, Red As Integer, _
    Green As Integer, Blue As Integer)
Dim lngRed As Long
Dim lngGreen As Long
Dim lngBlue As Long

    lngBlue = Int(Value / 65536)
    lngGreen = Int((Value - (65536 * lngBlue)) / 256)
    lngRed = Value - ((lngBlue * 65536) + (lngGreen * 256))
    Red = lngRed
    Green = lngGreen
    Blue = lngBlue
End Sub
 
Formatted by Neil Crosby
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated