The new vbAccelerator Site - more VB and .NET Code and Controls
Source Code
2 Common Controls Library &nbsp
&nbsp

Using the Toolbar with the vbAccelerator ImageList class

Toolbar using ImageList class as Image Source

Download the Toolbar/Image List Class Demonstration (54kb)

&nbsp Before you Begin &nbsp
&nbsp This project requires the SSubTmr.DLL component. Make sure you have loaded and registered this before trying the project. &nbsp
&nbsp The vbAccelerator toolbar control is also required. Download and register this before trying this sample. &nbsp

This project demonstrates how to use the vbAccelerator Image List class to generate the images for a toolbar. Image strips containing the following button pictures are stored as bitmaps in the project's resource file:

Resource ID Description
101 True Colour Bitmap, Hot Images (Colour)
102 True Colour Bitmap, Standard Images (Grayscaled)
103 16 Colour Bitmap, Hot Images (Colour)
104 16 Colour Bitmap, Standard Images (Gray)

To get the most out of resources in VB5, you should download the VB resource editor add-in. This is available for free for all registered owners of Visual Basic from the Microsoft web-site. Get it at http://msdn.microsoft.com/vbasic/downloads/samples.asp. In VB6 the resource editor is built in and can be accessed via the project wizard.

The demonstration code shows how to dynamically pick the correct colour depth images for the target system's colour depth and also how to fall-back to using bitmaps if the target system has an old version of COMCTL32.OCX which doesn't support image lists or hot item images.




TopBack to top

Source Code - What We're About!Back to Source Code

&nbsp

AboutContributeSend FeedbackPrivacy

Copyright 1998-1999, Steve McMahon ( steve@vbaccelerator.com). All Rights Reserved.
Last updated: 22 November 1998