We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CommandBarController doesn''t work properly with MenuStrip

Thread ID:





39263 Jan 3,2006 07:56 AM UTC Jan 3,2006 10:26 AM UTC WinForms 1
Tags: Tools
Läski Soosi
Asked On January 3, 2006 07:56 AM UTC

Hi, I have an application where I use System.Windows.Forms.MainMenu and Syncfusion.Windows.Forms.Tools.CommandBarController (version This combination works fine. However, we are going to move to use VisualStudio 2005 and this version provides a new menu control(System.Windows.Forms.MenuStrip). It seems, that CommandBarController does not work properly with MenuStrip: It moves the Menustrip from its "natural position" (see attached file). OK, it is possible that the MenuStrip is put into a commandbar but I would like that the menu is "locked" top of the form in a way that a user cannot drag it. What can I do? Can I use the MenuStrip with the CommandBarController at all?


Mano J [Syncfusion]
Replied On January 3, 2006 10:26 AM UTC

Hi Semu, This is because of Microsoft bug in .Net Framework 2.0 with MenuStrip. I have attached a sample that demonstrates this issue in .Net Framework: there is MyComponent, that supports ISupportInitialize interface, and MenuStrip with some items. In MyComponent.EndInit() method, a button is added to Hosted Form''s controls, and set DockStyle.Top to that button. You can see the same appearance. SampleComponent.zip We already have an open bug report logged regarding this issue:: CommandBar occupies topmost part of form when used with windows Menu Control in VS 2005. As a workaround, you could follow the steps below to use the CommandBarController along with MenuStrip: 1. Add a commandBarController component to the form. 2. Create a commandBar by right clicking on the commandBarController component. 3. Set the following properties to true for ''CommandBar1''. a) HideChevron b) HideCloseButton c) HideDropDownButton d) HideGripper - (This will remove the gripper at the left side of commandBar so that the user cannot drag it.) 4. Add a panel to commandBar1. 5. Now Drag and Drop ''MenuStrip'' control into the panel. (The MenuStrip will now appear in the top) 6. You can then add any more commandBars using the normal procedure. I have attached a sample that shows this workaround completely. Please refer to it and let me know if this meets your requirements. We appreciate your feedback and thank you for using Syncfusion products. Regards, Mano MenuStrip_CommandBar.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon