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.

Problem with ChildBarFrameManager in MDI-Application

Thread ID:





3133 Mar 4,2003 07:45 AM Mar 11,2003 01:56 PM Windows Forms 4
Tags: Tools
Joerg Krause
Asked On March 4, 2003 07:45 AM

I've a problem with ChildBarFrameManager. I'm using the windows manager class from the featured demo project. It works successfull in my application. Today I open the project and the programm isn't longer running (compiling ok). During the MDI-child creation process the following run time error occurs: System.ArgumentException: Cannot find a ChildFrameBarManager associated with the form type: Genesis.HtmlEditorForm at Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.RegisterMdiChildTypes(Type[] formTypes) 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 Genesis.WindowManager.AddDocument(HtmlEditorForm newForm) in d:\dokumente und einstellungen\joerg\eigene dateien\visual studio-projekte\worldsoftgenesisii\windowmanager.cs:line 211 at Genesis.WindowManager.AddDocumentFromFileName(String fileName) in d:\dokumente und einstellungen\joerg\eigene dateien\visual studio-projekte\worldsoftgenesisii\windowmanager.cs:line 204 at Genesis.WindowManager.OpenFile() in d:\dokumente und einstellungen\joerg\eigene dateien\visual studio-projekte\worldsoftgenesisii\windowmanager.cs:line 110 at Genesis.WindowManager.openBarItem_Click(Object sender, EventArgs e) in d:\dokumente und einstellungen\joerg\eigene dateien\visual studio-projekte\worldsoftgenesisii\windowmanager.cs:line 95 at Syncfusion.Windows.Forms.Tools.XPMenus.BarItem.OnItemClicked(EventArgs args) at Syncfusion.Windows.Forms.Tools.XPMenus.BarItem.PerformClick() at Syncfusion.Windows.Forms.Tools.XPMenus.BarRenderer.OnMouseUp(MouseEventArgs e) at Syncfusion.Windows.Forms.Tools.XPMenus.BarControlInternal.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.Tools.XPMenus.BarControlInternal.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) == The step before the error are: // create new child form (successful) HtmlEditorForm childForm = new HtmlEditorForm(fileName); // let the new form attach to the mdi parent newForm.MdiParent = this.EditorMainForm; This statement forces the error. I've tried to debug. childForm does contain a ChildBarFrameManager. The designer shows the bar items. There are some ActiveX controls in the form, but this part of the application works in the past days with and without childBarFrameManager. == Questions: If the form has a childBarFrameManager, created with the designer and properly working in the past, what could happen here? How to debug the process of attaching a MDI child? Thanks for any idea on this subject, Joerg Krause Berlin, Germany

Joerg Krause
Replied On March 4, 2003 03:51 PM

Some additional informations: If I delete the previous used childFrameBarManager (loosing all associated Bars), the error disappears. If a new childFrameBarManager was added from the toolbar, the error reoccurs. It doesn't matter if bars associated or not. Joerg

Ramesh Praveen [Syncfusion]
Replied On March 5, 2003 07:35 AM

Joerg, This probably happens because your child form doesn't have a default constructor. Like we state in our User's Guide, all child forms (using the ChildFrameBarManager) should include a default constructor calling the InitializeComponent method (where the bar manager gets initialized). This is necessary because our framework will want to create a dummy instance of each registered child form type. So, provide a default constructor like this: public HtmlEditorForm() { InitializeComponent(); } and it should work fine. Regards, Praveen Ramesh

Joerg Krause
Replied On March 5, 2003 04:27 PM

Thank you for the response. I've read about the constructor in the help files. So I had a constructor but without InitializeComponent() in it. What it really needs was the call to InitializeComponent(); which I have removed. Maybe the info is helpful for anybody. > > public HtmlEditorForm() > { > InitializeComponent(); > } > > and it should work fine. > > Regards, > Praveen Ramesh > Joerg

Administrator [Syncfusion]
Replied On March 11, 2003 01:56 PM

Thanks for the update.


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.