Windows Develop Bookmark and Share   
 index > Windows Forms Designer > IDE Crash Using Inherited Forms in C#/VS2005
 

IDE Crash Using Inherited Forms in C#/VS2005

I'm having a bit of an issue when using inherited forms. What I've tried to do is to create a set of inherited configuration dialogs which mirror the inheritance tree of the objects to be configured. That is to say, the base object is configured by a base form, while an object derived from that object is configured by a form derived from the base form, and so on up the tree.

The upshot of all of this is that there are several levels in the inheritance tree, and some of the configuration dialogs are inherited from forms which are in turn inherited from another.

The designer, aside from a problem finding the appropriate DLL's on load, which is easily fixed by closing down all of the designer panes for the inherited forms and then reopening them, seems to be working fine. However, I recently had to add a configuration dialog that is configuring an object which is two inheritance levels removed from the base form, and clicking on its designer crashes the IDE! I want to make this clear, it does NOT show me a designer rendering error in the code pane. Itcrashes the IDE.

Upon the advice of other threads and various Google searches, I've been able to isolate the form's Load event from being called in the designer (DesignMode property), attaching the [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] attribute to the passed-in class to be configured, etc. While doing so has had a positive effect on the designer's behavior for the classes I am able to view the designer for, clicking on the offending form still crashes the IDE.

Is it possible that I'm trying to do "too much"? Anyone have any ideas what might be happening, and a possible way to work around this?

One thing that has come about in my research into this issue is that the object I'm trying to configure is composed of objects in a referenced DLL. Don't know if this helps, but I'd thought I'd throw it in.

Thanks in advance.

Chuck S_  Monday, March 26, 2007 5:53 PM
On further examination, setting the Localizable property on the offending form to false seemed to remedy the problem. This doesn't precisely solve my problem, because I do want the Localizable property to be active for localization purposes.
Chuck S_  Monday, March 26, 2007 7:07 PM

You can use google to search for other answers

Custom Search

More Threads

• Making the Property Hide according to control in Multiple selection.
• Setting visibility of properties in a propertygrid at runtime
• Background image resources cause VS error
• Inherited forms - Designer adds code with third party control
• the designer could not be shown for this file because none of the classes within it can be designed
• Form Designer loading problem
• Exposing Text property of a UserControl
• Usercontrol customproperties
• Determining image type which was saved in resources
• Ambiguous match found