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.

Why does MainFrameBarManager create a second form?

Thread ID:

Created:

Updated:

Platform:

Replies:

42988 Apr 11,2006 11:05 AM Apr 12,2006 01:04 PM Windows Forms 3
loading
Tags: Tools
Matthew Schumaker
Asked On April 11, 2006 11:05 AM

Why does the MainFrameBarManager create a second copy of my form when I set the MdiParent for the child form. This is forcing two copies of everything to be made and making my app much more complicated than it needs to be. xxx.xxxxxxx.demo.dll!xxx.xxxxxxx.demo.View.VersionView.VersionView() Line 42 C# syncfusion.tools.windows.dll!Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.GetFormFromType(System.Type formType = {"xxx.xxxxxxx.demo.View.VersionView"}) + 0x5f bytes syncfusion.tools.windows.dll!Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.RegisterMdiChildTypes(System.Type[] formTypes = {Length=1}, System.Windows.Forms.Form[] forms = {Length=1}) + 0x212 bytes syncfusion.tools.windows.dll!Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.OnMdiChildAdded(System.Windows.Forms.Form childForm = {xxx.xxxxxxx.demo.View.VersionView}) + 0x114 bytes syncfusion.tools.windows.dll!Syncfusion.Windows.Forms.Tools.XPMenus.MainFrameBarManager.MdiChildAdded(System.Object sender = {System.Windows.Forms.MdiClient}, System.Windows.Forms.ControlEventArgs e = {System.Windows.Forms.ControlEventArgs}) + 0x34 bytes system.windows.forms.dll!System.Windows.Forms.Control.OnControlAdded(System.Windows.Forms.ControlEventArgs e = {System.Windows.Forms.ControlEventArgs}) + 0x5b bytes system.windows.forms.dll!System.Windows.Forms.Control.ControlCollection.Add(System.Windows.Forms.Control value = {xxx.xxxxxxx.demo.View.VersionView}) + 0x371 bytes system.windows.forms.dll!System.Windows.Forms.MdiClient.ControlCollection.Add(System.Windows.Forms.Control value = {xxx.xxxxxxx.demo.View.VersionView}) + 0x10c bytes system.windows.forms.dll!System.Windows.Forms.Control.set_ParentInternal(System.Windows.Forms.Control value = {System.Windows.Forms.MdiClient}) + 0x25 bytes system.windows.forms.dll!System.Windows.Forms.Form.set_ParentInternal(System.Windows.Forms.Control value = {System.Windows.Forms.MdiClient}) + 0x20 bytes system.windows.forms.dll!System.Windows.Forms.Form.set_MdiParentInternal(System.Windows.Forms.Form value = {xxx.xxxxxxx.MainForm}) + 0x213 bytes system.windows.forms.dll!System.Windows.Forms.Form.set_MdiParent(System.Windows.Forms.Form value = {xxx.xxxxxxx.MainForm}) + 0x10 bytes

Administrator [Syncfusion]
Replied On April 11, 2006 11:07 AM

Forgot to mention VersionView is the child form.

Mano J [Syncfusion]
Replied On April 12, 2006 10:17 AM

Hi Matthew, When you call RegisterMDIChildTypes to register one or more child types, the framework internally creates a new instance of the child Form (a dummy form( to get the list of toolbars and bar items (and uses those to display the disable state). Note that this dummy instance will never be shown (it''s Form_Load will never be called) and will be disposed on app shutdown. If you utilize explicit merging (with a call to RegisterMdiChildTypes) then the dummy forms still get created. However if you use implicit merging (without a call to RegisterMdiChildTypes) then no dummy form will be created. We are looking at various alternatives to get rid off the dummy form logic. Please let me know if you have any questions. Thanks for using Syncfusion products. Regards, Mano

Administrator [Syncfusion]
Replied On April 12, 2006 01:04 PM

The issue is that menu items are create when the dummy child form is created. These menu items are tighly bound to that form. Since the form doesn''t have the correct information in it, the menu items don''t work properly. I''m not explicitly registering my types so I don''t understand why these dummy forms are being created. -Matt

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.

;