473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problem in accessing menustrip items in VB.Net 2005.

88 64KB
Hi everyone,
I'm working with VB.Net 2005(.Net framework 2.0). I am having a problem in accessing the items in a menustrip of a form. Suppose there is an item in a menustrip named FILE. Under the FILE item there are 3 subitems- OPEN, SAVE and EXIT. Now, I wanna access and disable the 2nd subitem i.e. SAVE with its index value. In VB.Net 2002 it could be done by the following code:

Me.Menu.MenuItems(0).MenuItems(1).Enabled=False

The first 'MenuItems(0)' refers to the item- FILE.
The latter one refers to the 2nd item of FILE (Array concept).

But in VB.Net 2005 I can write the above code upto....
Me.MenuStrip1.MenuItems(0)
After that I cannot access any subitem. Can anybody provide me the code snippet for that?
Dec 24 '07 #1
0 980

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: John J. Hughes II | last post by:
Could someone explain how to merge the form menu with the mdi container window. The menu strip items on the form window merge but I either end up with a blank blue menu on the form or top list of...
2
by: ShaneO | last post by:
Probably a stupid question, but I can't seem to find how to Enable/Disable Submenu items within a MenuStrip. File -Open -Save .. ..
0
by: academic | last post by:
I'm having a problem merging a ContextMenuStrip for a UserControl to the MenuStrip on the form containing the UserControl. I tried the following thinking that it is equivalent to cloning the...
0
by: genojoe | last post by:
Included below are four methods and a Friend that can be inserted directly into a form that already contains Button1, Button2, and MenuStrip1. Button1 populates the MainMenu control, button2...
6
by: Luqman | last post by:
How can I dynamically Add menuStrip and its menuItems through code using VB.Net 2005 ? Best Regards, Luqman
0
by: active | last post by:
For the last 3 or 4 days I've been, on an off, searching the Internet and theVS2005 Doc for an example of how to add a contextmenustrip to a menustrip. I can move all the items from a...
0
by: kyungdongkim | last post by:
Hi, I have a dynamically generated MenuStrip following this example: http://www.codeproject.com/useritems/Dynamic_MenuStrip.asp Basically the menu strip allows users to save and load reports. ...
0
by: priyamtheone | last post by:
Hi everyone, I'm working with VB.Net 2005(.Net framework 2.0). I am having a problem in accessing the items in a menustrip of a form. Suppose there is an item in a menustrip named FILE. Under the...
0
by: Andrus | last post by:
WinForms MDI parent form menu system (MenuStrip and ToolStripMenuItem's) created in designer using MenuStrip. ToolStripMenuItems items have text, image properties and onclick event set. At...
2
by: Brian | last post by:
Hi, I have a menustrip that has 3 main menus and various number of menus below them... I am trying to figure out how i can loop through the main menus and then loop through each one of the main...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.