How to Create transparent images using imagelist control
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 'Controls - How to Create transparent images using imagelist control 'The ImageList control has a MaskColor property whose value determines the color 'that should be considered transparent when you're performing graphical 'operations on individual ListImage objects or when you're displaying images 'inside other controls. By default, this is the gray color (&HC0C0C0), but you 'can change it both at design time in the Color tab of the Properties dialog box 'and at run time via code. 'When a graphical operation is performed, none of the pixels in the image that 'are the color defined by MaskColor are transferred. To actually display 'transparent images, however, you must ensure that the UseMaskColor property is 'set to True, which is its default value. You can modify this value in the 'General tab of the Properties dialog box or at run time via code: 'Make white the transparent color. ImageList1.MaskColor = vbWhite ImageList1.UseMaskColor = True |