Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Can't edit a protected menustrip in an inherited form.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael.Suarez@gmail.com - 02 Mar 2006 22:10 GMT
I have a form in a windows control library with a menustrip on it. The
menustrip, as well as all of the items on it, have their modifiers set
to Protected.

Now i inherit from this form in another project. Neither the menu strip
nor any of its items can be editted... as if they are all private.

However, if i put a button on the form in the control library and make
it protected, I can do whatever i want with the button once i inherit.

What is the difference between the menustrip and the button that
doesn't allow me to have my way with the menustrip? is there a way to
fix this?
InK_ - 03 Mar 2006 08:31 GMT
Hi, Michael

The difference is that menustrip is a collection of controls when button is
a single control.
The problem is because Microsoft limited changing of collections in
inherited forms.
You can read about this problem here:
http://cs.rthand.com/blogs/blog_with_righthand/archive/2005/11/10/186.aspx
For brief description of technical problems which were encountered by
Microsoft development team look at the comment of Shawn Burke (Development
Manager, Windows Forms Team)

Signature

Regards,
Inna Stetsyak aka InK_

> I have a form in a windows control library with a menustrip on it. The
> menustrip, as well as all of the items on it, have their modifiers set
[quoted text clipped - 9 lines]
> doesn't allow me to have my way with the menustrip? is there a way to
> fix this?
Michael.Suarez@gmail.com - 06 Mar 2006 15:32 GMT
Thanks for that link. Very interesting.

My idea was to create a base form that already had a set of menu items
that all programs should have, already in its main menu. But it's
probably a better design to just have a base form and a base menustrip
and add the menustrip to the derived form anyway, especially
considering this limitation (or bug or feature, depending how you look
at it).

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.