Guides & Tutorials

Guides and Tutorials

Setting the Size of ToolBar Icons when using Large Icons

by Mike Palmatier Visual Basic 6 Created on 02/03/2008  |  Updated on 08/28/2024 0/5 ( 0 votes )

You can specify which size icon should be used when the CommandBars.Options.LargeIcon property is set to True. To do this, use the CommandBars.Options.SetIconSize method. Passing in a value of True for the first parameter specifies that the specified size will be used when LargeIcons are displayed. If False, then the largest set of icons added will be used. If you do not supply a larger icon size, then the closest size icon to the one you are trying to display will be "stretched" to the specified size.

Toolbar using 24x24 sized icons.
24x24 Toolbar Icons

Toolbar using 54x54 sized icons.
54x54 Toolbar Icons

The code below will set the size the ToolBar icons to 32x32 when CommandBars.Options.LargeIcons are enabled.

CommandBars.Options.LargeIcons = True
CommandBars.Options.SetIconSize True, 32, 32

User Comments

No comments yet, sign in to comment.