Toll Free: (877) 723-1442 U.S. and Canada
Support
ActiveX / COM
Visual C++ / MFC
Customer Spotlight
Corporate Partners
Contact Sales

Call center available M-F 9:00 - 6:00 US Eastern Time.

U.S. and Canada
(877) 723-1442

International
(517) 625-5729

Email

Changing the Popup Menu Icon Size

Author: Mike Palmatier
Posted: February 2, 2006
Environment: 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.





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

 

 CommandBars.Options.SetPopupIconSize 24, 24

 

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Other products and/or company names may be trademarks or registered trademarks of their respective owners.