Dynamic Menu Control (Updated)

By | 2002-06-01

This control, when placed on a form, will allow you to dynamically create menus at runtime. I have included the code for the OCX and a simple test harness.

Original Author: Pete Cozens

Inputs

N/A

Assumptions

This code was developed in VB6 on NT4.
It requires that you add a dummy popup menu with a child menu array item to the form to work (Neither of which will be visible at runtime). Take a look at the View menu in the test harness to see how the dummy menu items should be setup.
Update: You’ll also need to have atleast one other VB menu item at the same level as the ‘dummy’ popup menu, otherwise VB will not allow the dummy to be hidden.

Returns

N/A

Side Effects

None known at this time.

Attachments

FileUploadedSize
CODE_UPLOAD3740332000.zip9/3/2020 3:45:00 PM15758
Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.