Support The Full ImageList API In VB4

Support The Full ImageList API In VB4

To draw a selected transparent image in VB4 from an Imagelist control,as you do in C++, follow these steps. The ImageList_ API functions have many features that weren’t passedthrough in the control. In order to support the full API, the ImageListcontrol exposes the property hImageList, which returns a handle you canuse when calling the API functions. In the ListImage.Draw method, you can specify imlNormal, imlTransparent,imlSelected, or imlFocus. In the underlying API ImageList_Draw function,however, these are bit flags, and there is an additional flag to draw amask. This function draws an image from an image list with any combinationof draw flags:

 Sub DrawImage(img As ImageList, vIndex As Variant, _	hDC As Long, x As Long, y As Long, _	Optional vDraw As Variant)	If IsMissing(vDraw) Then _		vDraw = ILD_NORMAL Or ILD_TRANSPARENT	ImageList_Draw img.hImageList, _		img.ListImages(vIndex).Index - 1, hDC, _		x / Screen.TwipsPerPixelX, _		y / Screen.TwipsPerPixelY, vDrawEnd Sub

These functions are documented on the MSDN. Take a look. You may findmany other uses for them.

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular