VBRocks > that would only handle for the first tier of menu items.
Main Topics
Browse All TopicsIn VB6 I was able to loop through all the Items in the MainMenu Control quite easily because VB6 didnt break it down parent/child nodes, they were just listed. See my code below on how I cycled through them.
All I had to do was loop through the "oObject.Name" to access all the items.
Now in VB.net I am stumped how I achieve the same function.
I need to convert the provided Function to VB.net
I know somehow i have to integrate "ToolStripDropDownItem" but I am not sure how to do this..
Any help with be greatly appreciated
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Oh-ho-ho... Take a look at this:
http://social.msdn.microso
Thanks I will take a closer look at that when I get back to office tomorrow morning and can apply it to my application and see how it works.
Thanks for the link.
I had done some playing around, and I came close to figuring it out, but my code would have to had known how many tiers/childnodes of menu items I had....which is not good programming. I knew I needed a series of loops. just didnt know how to arrange them...I will post tomorrow morning on my success or failure. Thanks again.
OK, I am getting closer.
Func MenuItemIndentOnGrid starts the recursive lookup on the mainmenu.
Func search is the recursive part.
In the func search when I reach this line:
strValue = strValue & tsi.Tag
I need to exit/get out of the recursive loop and continue on with an UPDATE statement.
So in laymens terms...If I find the matching menu item, "get the hell out" ...haha only if programming was written that way.
What I am getting thus far is all the TOP level items and the last menu item in ever top level.
Does any of that make sense?
I figured it out.
Here is the working code, and the ref where i found it:
http://social.msdn.microso
Thanks for the initial help.
Business Accounts
Answer for Membership
by: VBRocksPosted on 2009-10-28 at 15:23:48ID: 25688933
Something like this:
For Each item As ToolStripItem In Me.MenuStrip1.Items
Debug.WriteLine(item.Text)
Next