Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Derived UserControl with weird error : There is already a command handler for the menu command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'
 

Derived UserControl with weird error : There is already a command handler for the menu command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'

I built a UserControl to be a base for other usercontrols to inherit from. I've done this many times, but this is the first to produce such an error.
The base UserControl is a "Scanner". Derived UserControls will be more specific types of barcode scanners, each with their own initialization needs and so on.

So here's the weird part: I can open the base UserControl in Designer and have no issues.
When I open the derived control it won't load into designer with the error:
There is already a command handler for the menu command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'

The weird part of this is there is no menu. The base control has some ListBoxes for things like COM port and baud rate, some labels, a couple buttons and a checkbox.

There are properties for Port, Baud, Parity etc.
There are methods for "SaveSettings", "LoadSettings",
There are virtual methods for "Connect", "Disconnect"
And a Forms.Timer for a couple basic tasks like seeing if the scanner responds within 3 seconds or not. No heavy lifting or precision required.

Nothing has been added to the derived control yet (because I can't make it open).
Just made one UserControl named 'Scanner', and fitted it with basic stuff.
Made a new usercontrol named "Barcode"
Changed public partial class Barcode : UserControl
to pub partial class Barcode : Scanner
And the derived Barcode gets that weird error.

Anyone have a tip?


tlhintoq  Thursday, August 06, 2009 9:32 PM
Oh you have GOT to be kidding...

Removing a straight line from the base UserControl fixed it. It was nothing special, just a "LineShape" from the OEM "Visual Basic PowerPack".

I had put it in as a dividing line between the generic options, and the type-specific options. Not in any way a menu command as the error would lead one to believe.

What a way to lead someone in the wrong direction and waste 2 hours.
  • Marked As Answer bytlhintoq Thursday, August 06, 2009 9:54 PM
  •  
tlhintoq  Thursday, August 06, 2009 9:54 PM
Oh you have GOT to be kidding...

Removing a straight line from the base UserControl fixed it. It was nothing special, just a "LineShape" from the OEM "Visual Basic PowerPack".

I had put it in as a dividing line between the generic options, and the type-specific options. Not in any way a menu command as the error would lead one to believe.

What a way to lead someone in the wrong direction and waste 2 hours.
  • Marked As Answer bytlhintoq Thursday, August 06, 2009 9:54 PM
  •  
tlhintoq  Thursday, August 06, 2009 9:54 PM

You can use google to search for other answers

Custom Search

More Threads

• Controls, Particularly User Controls, disappearing or Being Resized on Build
• Web Browser control issue
• EditorAttribute issue with Common Types
• get events of an object declared in code
• Using WMI to get date and time on a remote computer
• Cannot cast MyControl to MyControl in designer
• How to obtain a member field declaration WithEvents using CodeDom
• Forms Migrated from VS 2003 cannot be viewed in design view in VS 2005
• How to add controls to the designer surface during run time
• Handle delete of a Tab from a TabControl collection, at design time