'Dynamic' menus in VB6.0

Under VB6.0, is it possible to define the contents of a menu, other than by using the menu editor? Is it possible to load the contents of a menu, while the program is running, from a file? This way the menu can be changed by changing the file contents, and not by having to change the program each time.
TGBAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

caraf_gCommented:
Not with VB menus. Sheridan sells a menu control that allows you to do this sort of stuff.
0
TGBAuthor Commented:
Please tell me more about this Sheridan  product. Many Thanks.
0
alokanantCommented:
Yes it is possible.

You have to create a menu item, give an index to it say 0. In order to load other menu items and change different menu properties, u can use the following code -

dim mnu as menu.

' if the name of the menu item created on form is mnuTest and its index is 0.
then in the form load event u can write the following code -

load mnuTest(1)
mnuTest(0).Caption = "MyCaption1"
mnuTest(1).Caption = "MyCaption2"

'Similarly u can access other properties.

hth
alok.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

alokanantCommented:
sorry!
I think I have misunderstood the question.

alok.
0
VbmasterCommented:
Sure it's possible, here's a excellent solution to do it, with a great example project, all free code of course. ,)

http://vbaccelerator.com/codelib/cpopmenu/article.htm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
caraf_gCommented:
0
VbmasterCommented:
a $200 control with no source code versus free source code.. tough choice
0
caraf_gCommented:
True <g>
0
caraf_gCommented:
Hey, vbmaster, is the code for the subtimer dll also free?
0
VbmasterCommented:
Sure thing, you can find it on the page..

   http://vbaccelerator.com/codelib/ssubtmr/ssubtmr.htm

The direct link to the project code for the dll is

   http://vbaccelerator.com/codelib/ssubtmr/sbtmrc.zip
0
jayaram_tCommented:
It is possible to do it if u have at least one menu item in the menu excluding those that u r going to build up at run time from the text file. U must first create a menu item using the menu editor and give it an index of zero in order to specify that it is going to be part of a control array. Then u can use ur code to load menu items one by one and use the text from the text file as the menu captions.
0
caraf_gCommented:
u?
r?
What language are you speaking?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.