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.
Who is Participating?
ChloesDadConnect With a Mentor Commented:
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
Assuming that you are working in then it is straight forward


        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.
yuvaratnaAuthor Commented:
i tried This..But the order of menu items didnt change...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.