Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

Bitmap Transparency

SftBox/OCX automatically uses bitmap transparency for all bitmaps used throughout a combo box control. When a bitmap is displayed, the background can show through portions of the bitmap. SftBox/OCX accomplishes this by dynamically modifying a copy of the bitmap to adjust for the background.

The top, left pixel of each bitmap is inspected as the bitmap is painted. The color of that pixel represents the bitmap's background color. This color is replaced throughout the bitmap with the actual background.

If the bitmap image includes the top, left pixel, add an extra row or column of pixels to the bitmap, so the image does not include the top, left pixel.

Bitmap transparency is only used for bitmaps and is not used for GDI+ images, icons, images in an ImageList control, Windows metafiles or other images that can be represented by a SftPictureObject object.

.NET When using SftBox/OCX with .NET, bitmap transparency is only used for bitmaps loaded using the property pages. Any bitmaps converted from a PictureBox or an Image object will not use bitmap transparency. With .NET, the PictureBox control and Image objects support all image formats (gif, jpeg, ico, etc.) and are also supported by SftBox/OCX. Some of these image formats already define transparency and should be used if image transparency is desired.

Bitmap transparency is fully automatic and cannot be turned off. GDI+ images, icons, animations and Windows metafiles are not affected by bitmap transparency.


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.