Not tested, but this should work for converting a BGR to RGB:


VB Code:
  1. Public Function BGRtoRGB(Byval BGR as Long) As Long
  2.  Dim R As Byte, G As Byte, B As Byte
  3.  
  4.  R = BGR And &HFF
  5.  G = BGR And &HFF00
  6.  B = BGR And &HFF0000
  7.  
  8.  BGRtoRGB = RGB(R,G,B)
  9. End Function