Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Cannot CreateDesigner for MainMenu
 

Cannot CreateDesigner for MainMenu

In my designer host, if I have a MainMenu component called "mainMenu", I am unable to get a Designer using the following techniques:

GetDesigner(mainMenu);
TypeDescriptor.CreateDesigner(mainMenu, typeof(IDesigner));

I would like to get this to work ASAP, so I don't want to wait for MenuStrip.

Does anyone know how to get the IDesigner that Visual Studio uses for MainMenu design?

Thanks,
Greg
Greg Shaffer  Monday, August 29, 2005 11:04 PM
Hi,

Designer for Menu class (base class for MainMenu, MenuItem and ContextMenu) is in Microsoft.VisualStudio.dll assembly (can be found on Microsoft Shared folder or Visual Studio/SDK/bin folder).

Adding reference to that assembly or loading the assembly on runtime would allow you to get/create the designer's instance by calling:

IDesigner menudesigner = TypeDescriptor.CreateDesigner(mainMenu, typeof(IDesigner));

Regards,

-chris
Chris Vega  Tuesday, August 30, 2005 3:16 AM
Hi,

Designer for Menu class (base class for MainMenu, MenuItem and ContextMenu) is in Microsoft.VisualStudio.dll assembly (can be found on Microsoft Shared folder or Visual Studio/SDK/bin folder).

Adding reference to that assembly or loading the assembly on runtime would allow you to get/create the designer's instance by calling:

IDesigner menudesigner = TypeDescriptor.CreateDesigner(mainMenu, typeof(IDesigner));

Regards,

-chris
Chris Vega  Tuesday, August 30, 2005 3:16 AM
Chris,

Thank you very, very much!

-Greg
Greg Shaffer  Tuesday, August 30, 2005 5:45 PM
Hmm...

Are we allowed to distribute Microsoft.VisualStudio.dll?

If anyone knows, please respond, otherwise I will contact Microsoft to figure out if I can distribute that assembly.

Thanks,
Greg
Greg Shaffer  Tuesday, August 30, 2005 5:50 PM

You can use google to search for other answers

Custom Search

More Threads

• How to create a Multicolumn ComboBox in VB.Net?
• How do I programmatically create a usercontrol and add to the designsurface
• Usercontrol customproperties
• how to create AVI from a bunch of Bitmap files in C#
• Design Time or Compiler Bug? Form Resizing But Not Resizing Anchored Controls
• Set Mdiparent from child form in c#
• Creating Tree View in Datagrid in VB.Net 2005?
• TabControl problem
• serial port programing problem
• Custom properties in application hosted designer