Add a item to a menu at runtime

the title says it all.

i'll use it for displaying the recent opened/saved files.

any ideas?

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.

How about adding one item and use the Load statement to load more items during run-time, this is the most used method for these kind of problems.

Create a menu item with index 0 and use Load mnuname(1).. Load mnuname(2) etc to load more items.
another option is to use a set number of recent files, and change the caption and visible property at run-time to control the names and how many are shown.
There is an Win API function that is AppendMenu that lets you insert a menu item on a menu. Thought this function needs that you supply it with the menu Handle. To get the menu handle you can use the GetMenu Win API function. This function will return you the handle. My advise is for you to get an Win API reference and see the help about these functions.
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!

pin_plunderAuthor Commented:
vbMasteer, i like your comment, post it as an answer and i'll give you the points.
pin_plunder, you can select vbmasters comment as the selected answer without having him post again.  There is a clickable area for this on the "Comment" line...


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
pin_plunderAuthor Commented:
thanks vbmaster your help was useful.
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.