CommandBars Articles and Tutorials

Why you should use the ImageManager Control

Author: Mike Palmatier
Platform: Visual Basic 6.0

The ImageManager control is similar to the Standard Microsoft ImageList control and is intended to be used as a replacement for the Standard ImageList Control. However, the ImageManager is a much more powerful tool. One of the most noticeable improvements is that the IconManger supports 32-bit Alpha Icons with transparency.

When an image is added to the ImageManager, a disabled image, hot image, and checked image are automatically generated.

Another nice feature is that you can add multiple size images for each icon. For example, you can add both 16x16 and 32x32 icons and simply set the CommandBars.Options.LargeIcons property to True to use the larger set of icons.

The images in the ImageManager are given an IconId. Using this ID, you can use the Icons from the ImageManager in several of Codejock's components including CommandBars, DockingPane, PropertyGrid, TaskPanel, ShortcutBar, and ReportControl.

If you are using Right-To-Left mode, you can "mirror" the images so that they are displayed correctly.

There are several options for importing and exporting images. At design time, you can Import icons from a Bitmap file or an XML file. You can also export the icons to an XML file or to a Bitmap (.bmp) file. When exporting, you have the option to choose which icons will be exported and the mask color. You can export the icons as a single bitmap file that contains all of your icons.

You can also add images to the image manager via code. You can add individual images one at a time, or you can import a bitmap file that contains many icons at the same time.