Menu Designer not visible

I've created a base form with its own designer and an unfortunate side-effect is that a Menu control's designer will not show up when you drag a menu onto the form.  From the MainMenu1 component in the "tray" you can right click and choose "Edit Menu" but it gets the error message... "Object reference not set to an instance...".

Everything else is working with the base form, inclluding custom designer verbs.  Here is how I declare the designer:
internal class BaseFormDesigner : System.Windows.Forms.Design.DocumentDesigner 
{
    DesignerVerbCollection m_Verbs;
        :
The menus Do work on the base form - but it is difficult for developers when they cannot use the menu designer. I've tried opening a second VS, chosing the debug process, enabling breaking on Exceptions which works but it says Source Code cannot be found.  I only see system code in the call stack.....

Any ideas





Answer this question

Menu Designer not visible

  • daveky

    I've found that when trying to debug design time functionality, inserting System.Diagnostics.Debugger.Break() into the code works a lot better than trying to attach another instance of Visual Studio.  When the design time thread hits the*space
    space*it will start up the new instance for you and position you at the source code line.

  • Parboo

    .

    Hmm..well, I'm 0 for 6 at these forums.

    Not to malign those of you who do answer questions here, has anyone found other "design-time" forums out there.  Thx

  • Spaccabit

    I acturally have the same issue, but I employ my own form designer and have this problem, I found out that the ImenuEditorService is the service that employs the menu editiing bits. I'm having to write this all out my self so that my designer can support editing menus.

    Though what the problem you are having is beyond me, it kind of sounds like maybe the default documentdesigner employs this service and yours isn't.

    Doesn't sound like fun if that's the case, you could override the getservcie method and see what services it's looking for with a stop statement

    Just an idea.

  • Matthew H. Sawyer

    I'll give that a try and report back if I discover something. Thanks for the leads...
  • Menu Designer not visible