VB Migration Partner’s support library hides most of the differences between the VB6 and the .NET versions of the ImageList control, but not all of them. In most cases the remaining differences should have no impact on migrated programs. Here’s their complete list:
- Under VB6, the Width and Height properties of the bitmap returned by the ListImage.Picture property are returned in HiMetric units, whereas under VB.NET these values are returned as pixels.
- Under VB6, the Width and Height properties of the bitmap returned by the ListImage.Picture property reflect the original size of the bitmap; under VB.NET these properties reflect the original size of the bitmap only if the bitmap was added dynamically at runtime; if the bitmap was added at design time, these properties return the dimensions of the resized bitmap.
- The VB6 ImageList control can contain images of different size (unless the ImageList is bound to a common control) and there is no limit to the image size; the .NET control only accepts images of same size and can’t contain images wider or higher than 256 pixels.
- The ListImage.Draw method of the VB.NET control doesn’t support the imlSelected and imlFocus styles.
- In an undocumented VB6 behavior, the ListImage.ExtractIcon method can affect the size of the bitmap returned by the ListImage.Picture property. This behavior hasn’t been implemented in VB.NET.