Articles and Tutorials

Changing the Popup Menu Icon Size

Author: Mike Palmatier
Platform: Visual Basic 6.0

You can change the size of the icons that appear in popup menus independently from the toolbar icon size. To do this the SetPopupIconSize method is used. You simply specify the width and height of the icon size you wish to use in the popup menus. The only thing you need to do is supply an icon of the size you want to display. 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.

Notice in the picture below that both a 16x16 and 24x24 icon have been added.

16x16 and 24x24 icons

16x16 and 24x24 icons

The code below will set the size of popup menu icons to 24x24.

CommandBars.Options.SetPopupIconSize 24, 24

Articles and Tutorials