none
There is already a command handler for the menu command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'

    Question

  • When I first load my form into the designer it wll works correctly and I can switch to the code view with no problem.

    After running my program or switching between design and code view I get the following error when I try and view the form in design mode

    Warning 1 There is already a command handler for the menu command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'.  0 0 

    By deleting the Bin and Obj directories (or closing and reopening the form) I can get rid of this message - but it returns next time I open the form (or compile my program)

    Any ideas?

    By the way there is no menu on this form.

    Chris Holland

     

    Friday, July 28, 2006 9:42 AM

All replies

  • Are you adding commands to the MenuCommand Service somewhere in your code? It would look something like:

    AddCommand(new MenuCommand(new EventHandler(this.ExecuteCut), StandardCommands.Cut));

     

    Friday, July 28, 2006 2:39 PM
  • No there is nothing like that ion my code or the designer generated code.

     

    I did a Search for "EventHandler" as well and only found the ones that I expected with no duplicates.

    Monday, July 31, 2006 6:50 AM
  • Here is the full error message:

     

    There is already a command handler for the menu command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'.
    Hide    

    at System.ComponentModel.Design.MenuCommandService.AddCommand(MenuCommand command)
    at System.Windows.Forms.Design.Behavior.BehaviorService.MenuCommandHandler.System.ComponentModel.Design.IMenuCommandService.AddCommand(MenuCommand command)
    at System.Windows.Forms.Design.CommandSet..ctor(ISite site)
    at System.Windows.Forms.Design.ControlCommandSet..ctor(ISite site)
    at System.Windows.Forms.Design.DocumentDesigner.Initialize(IComponent component)
    at System.Windows.Forms.Design.FormDocumentDesigner.Initialize(IComponent component)
    at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
    at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
    at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
    at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
    at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
    at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
     
    The only menu on the form is a popup menu
     
    Chris Holland
     

    Monday, July 31, 2006 6:53 AM
  • I have the exact same problem and I have no menu of any kind on my forms.  It appears as though it is being caused by Microsoft.VisualBasic.PowerPacks controls.  But that is unclear also.
    • Proposed as answer by Kuprienko Sunday, April 24, 2011 5:41 PM
    Tuesday, August 10, 2010 11:45 PM