Well, the return value of that API is the same value you'd get from the RGB function if you passed as parameters the 3 components corresponding to that color. The last 3 bytes of the Long number will each have one of the 3 color components, and you can get them through masking.
Blue = Color AND &HFF Green = (Color AND &HFF00) \ 256 Red = (Color AND &HFF0000) \ 65536 Hope this helps. Daniel > -----Mensaje original----- > De: four_blades [mailto:[EMAIL PROTECTED] > Enviado el: Monday, December 06, 2004 20:32 > Para: [EMAIL PROTECTED] > Asunto: [vbhelp] Making sense of return value > > > > > In using API getPixel I was hoping for a return value in HEX or > maybe something I could read more readily like (rrr,ggg,bbb). > Instead I got a variable length number like 700358412 (just made > that one up). > > How do I convert that number to something I can make sense of. > > Dave > > > > > > > > '// ======================================================= > Rules : http://ReliableAnswers.com/List/Rules.asp > Home : http://groups.yahoo.com/group/vbHelp/ > ======================================================= > Post : [EMAIL PROTECTED] > Join : [EMAIL PROTECTED] > Leave : [EMAIL PROTECTED] > '// ======================================================= > > Yahoo! Groups Links > > > > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/k7folB/TM --------------------------------------------------------------------~-> '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [EMAIL PROTECTED] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
