Available in the LEADTOOLS Imaging toolkit. |
UserPalette and BitmapPalette example for Access 2.0
This example demonstrates the UserPalette and BitmapPalette properties.
'Specify a blue and white user palette
Lead1.Object.UserPalette(0) = RGB(0, 0, 255)
Lead1.Object.UserPalette(1) = RGB(255, 255, 255)
'Implement the user palette
Lead1.Object.ColorRes 1, CRP_USERPALETTE, CRD_ORDEREDDITHERING, 2
'Display the blue and white image
Lead1.Object.ForceRepaint
MsgBox "This is the user palette. Click OK to change the bitmap palette."
'Change the bitmap palette to red and white
Lead1.Object.BitmapPalette(0) = RGB(255, 0, 0)
Lead1.Object.BitmapPalette(1) = RGB(255, 255, 255)
'Display the red and white image
Lead1.Object.ForceRepaint