Form Inheritance and Disappearing Objects

John Hinds

Newcomer
Joined
Feb 25, 2003
Messages
1
Location
Maui
Background:

I have created a base form in a class library. This base form contains a menu, an image list, and a toolbar. I set the Modifier properties for these items to Protected.

Then, in a new project, and using the form designer, I created a new form derived from the base form by adding an inherited form, and selecting the base form. In this new project, I added a new menu item, an image to the image list, and a button to the toolbar, and a label to the derived form. Next, I built the project, saved the files, and closed the project.

Issue:

When I reopen the project, I found the following:

(1) The new menu item did not appear
(2) The new image was not in the image list
(3) The new button was not on the toolbar
(4) However! -- the new label did appear on the derived form

When I reopen this project, I think I would expect to see the new menu item, and button with appropriate image on the toolbar, as well as the label.

I am new to developing classes and deriving from other classes, so I am sure there is something obvious that I am overlooking; however, I am stumped. I have exhausted my personal library, and could not find the issue on the forum. I would appreciate, very much, any advice regarding this issue. Thanks.
 
Has anyone else noticed this?

I know this is an old thread, but I am experiencing the same thing with a form inherited from my base form. I have 4 menu items on the base form, and I add a menu to the left-most position on the new form. When I do it, I can see all the menus. When I close the form and bring it back up, the new menuitem is gone!

When I look at the Windows Form Designer generated code area, I see the new menuitems I added, but the first item has an index of -1.

Any suggestions?
 
Back
Top