Changing The order Of menustrip Dynamically

i am working on a windows application whwere my menustrip has say 6items. if the logged in user is "Admin" , i wanted to show the 6th item in the list as the first one...I mean i wanted to change the order of menu items displayed. what is the property that i can use to change the Order of menu strip.
yuvaratnaAsked:
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.

ChloesDadCommented:
Assuming that you are working in vb.net then it is straight forward

        Me.MenuStrip1.Items.Clear()

        Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.StripMenuItemHeader6, Me.StripMenuItemHeader1, Me.StripMenuItemHeader2, me.StripMenuItemHeader3, me.StripMenuItemHeader4, me.StripMenuItemHeader5})

change the Me.StripMenuItemHeaderx to your own items. The sub items will move automatically with the headers.
0
yuvaratnaAuthor Commented:
i tried This..But the order of menu items didnt change...
0
ChloesDadCommented:
what version are you using

I made a form, put two main items on the menu, with sub menu items. Put a button on the form and the code I posted in the click event of the button. The menu items changed

Can you post the code from the designer and the code where you are changing it dynamically and I'll see if i can find the problem
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
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.