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.
Unfortunately, activation email could not send to your email. Please try again.

Using Frame Bar Managers with inherited MDI child forms.

Thread ID:

Created:

Updated:

Platform:

Replies:

32358 Jul 27,2005 07:20 PM Aug 3,2005 11:11 PM Windows Forms 5
loading
Tags: Tools
Damien Sawyer
Asked On July 27, 2005 07:20 PM

Hi - I''m having troubles using Frame Bar Managers with inherited MDI child forms. My setup is as follows frmMain - Main MDI parent form - contains mainFrameBarManager1 frmChildTemplate - base class on which all other MDI child forms are basd. (has default constructor). frmSingleItem - MDI Child form (inherits frmChildTemplate) (Ideally doesn''t need default constructor) frmOrders - MDI Child form (inherits frmChildTemplate) (Ideally doesn''t need default constructor) ... etc ... I need to have toolbars associated with frmItems and frmOrders. If I just add a ChildFrameBarManager to frmSingleItem and frmOrders I get a number of errors... MESSAGE: Cannot find a default constructor in the form type: Order_Promising_Workbench.frmSingleItem SOURCE: Syncfusion.Tools.Windows TARGET: Void RegisterMdiChildTypes(System.Type[], System.Windows.Forms.Form[]) STACK: at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.RegisterMdiChildTypes(Type[] formTypes, Form[] forms) at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.OnMdiChildAdded(Form childForm) at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.MdiChildAdded(Object sender, ControlEventArgs e) at System.Windows.Forms.ControlEventHandler.Invoke(Object sender, ControlEventArgs e) at System.Windows.Forms.Control.OnControlAdded(ControlEventArgs e) at System.Windows.Forms.ControlCollection.Add(Control value) at System.Windows.Forms.ControlCollection.Add(Control value) at System.Windows.Forms.Control.set_ParentInternal(Control value) at System.Windows.Forms.Form.set_ParentInternal(Control value) at System.Windows.Forms.Form.set_MdiParentInternal(Form value) at System.Windows.Forms.Form.set_MdiParent(Form value) at Order_Promising_Workbench.frmMDIParent.OpenChildFormBank(Type oType, String Key, Object[] args) in c:\Damien\Projects\Berri Order Promising Workbench\Berri Order Promising Workbench\Order Promising Workbench\Forms\frmMDIParent2.cs:line 469 I can rectify this, by adding a default constructor... However, then I get the following error... MESSAGE: Cannot find a ChildFrameBarManager associated with the form type: Order_Promising_Workbench.frmSingleItem SOURCE: Syncfusion.Tools.Windows TARGET: Void RegisterMdiChildTypes(System.Type[], System.Windows.Forms.Form[]) STACK: at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.RegisterMdiChildTypes(Type[] formTypes, Form[] forms) at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.OnMdiChildAdded(Form childForm) at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.MdiChildAdded(Object sender, ControlEventArgs e) at System.Windows.Forms.ControlEventHandler.Invoke(Object sender, ControlEventArgs e) at System.Windows.Forms.Control.OnControlAdded(ControlEventArgs e) at System.Windows.Forms.ControlCollection.Add(Control value) at System.Windows.Forms.ControlCollection.Add(Control value) at System.Windows.Forms.Control.set_ParentInternal(Control value) at System.Windows.Forms.Form.set_ParentInternal(Control value) at System.Windows.Forms.Form.set_MdiParentInternal(Form value) at System.Windows.Forms.Form.set_MdiParent(Form value) at Order_Promising_Workbench.frmMDIParent.OpenChildFormBank(Type oType, String Key, Object[] args) in c:\damien\projects\berri order promising workbench\berri order promising workbench\order promising workbench\forms\frmmdiparent2.cs:line 469 Note - there IS a ChildFrameBarManager associated with the form type: Order_Promising_Workbench.frmSingleItem.... there just isn''t one associated with frmChildTemplate. If I add a bar to frmChildTemplate then the problem goes away. however... The bars for frmSingleItem and frmOrders never appear. Toolbars that I add to frmChildTemplate ''sort of'' work... but are a bit flaky. In any case - It is not suitable for my design to have toolbars/buttons at this base class level; they are needed at the higher forms. Could someone please tell me if what I''m trying to acheive is possible and, if so, how? Thanks very much in advance, Damien Sawyer

Administrator [Syncfusion]
Replied On July 28, 2005 10:41 AM

Hi Damien, I have not been able to reproduce the problem here.I have attached the sample used for testing.Kindly modify the sample to show the problem and send it back to us so that we could investigate it here.Also,let me know the version of Essential Studio,Windows OS and the version of the .Net Framework being used by you.We appreciate your interest in Syncfusion products. Regards, Ebenezer.P InheritedMDI_1636.zip

Damien Sawyer
Replied On August 1, 2005 02:58 AM

Hi Ebenezer, Thanks very much for that sample. Sorry for the delay in getting back to you. I cannot compile the sample you''ve sent, nor can I open up your two inheritted forms in the designer. When I try to open MDIChild1 and MDIChild2 in the designer, I get the following error. " The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: Form4 --- The base class ''InheritedMDI.Form2'' could not be loaded. Ensure the assembly has been referenced or built if it is part of the project." On rebuild, I get the following compilation error. c:\TEMP\MDI Toolbars\InheritedMDI_1636\InheritedMDI\InheritedMDI\MDIchild2.cs(82): ''Syncfusion.Windows.Forms.Tools.XPMenus.Bar'' does not contain a definition for ''Caption'' I am running Syncfusion version 3.201.1.0 on Windows XP service pack two with framework version 1.1.4322. I ''did'' have version 2.0.5.0 of the Syncfusion suite installed up to last week. I uninstalled it before installing the new version (is this the way to do it?). I appears to me that all of the Syncfusion assemblies referenced in your project are the latest version. Also - I have "Copy Local" set to false for all of them. Thanks very much for your help. Damien Sawyer

Administrator [Syncfusion]
Replied On August 3, 2005 09:01 AM

Hi Damien, I suspect you are not linking to correct version of the assemblies. Please follow the steps below : 1. Delete all Syncfusion references in the GAC (C:\Windows\Assembly on a WindowsXP machine or C:\Winnt\Assembly on a Windows 2000 machine) 2. Delete all the contents of the folder ...\Syncfusion\Essential Studio\Assemblies 3. Bring up the v3.2.1.0 Assembly Manager tool and run it choosing the "Default Prebuilt" option. The Assembly Manager tool can be accessed from Start Menu >> Programs >> Syncfusion >> Essential Suite 3.2.1.0 >> Utilities >> Assembly Manager. 4. Open your project in the designer. Remove all the Syncfusion references and re-add them. Make sure they are all of version 3.201.1.0 if you are using VS.NET 2003 or 3.200.1.0 if you are using VS.NET 2002. Set their CopyLocal property to false in the designer. Now rebuild your application and run it. Everything should work fine now.If you wish to upgrade to 3.2.1.1 please create a Direct-Trac incident for the same.Let me know if you need further assistance. We appreciate your cooperation Regards, Ebenezer.P

Administrator [Syncfusion]
Replied On August 3, 2005 04:51 PM

Hi Damien, I believe the Caption property may have been added since v3.2.1.0, which would explain why the provided sample won''t compile. If you comment out all the offending lines, that should fix the problem. Regards, Gregory Austin Syncfusion Inc.

Damien Sawyer
Replied On August 3, 2005 11:11 PM

Thanks guys - that worked great! Out of interest, my original problem with the toolbars not displaying was that I was using an overloaded constructor and wasn''t calling InitializeComponent(); in the default one...

CONFIRMATION

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.

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.

;