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.

Add New Child Form to Parent MDI from Child Form

Thread ID:





35439 Sep 29,2005 11:16 AM Sep 30,2005 09:05 AM Windows Forms 4
Tags: Tools
Derek Price
Asked On September 29, 2005 11:16 AM

I have a tabbed MDI form that contains one form, say MyChildForm1. When MyChildForm1 is focused/active, I would like to launch another child form, say MyChildForm2 that gets added to the tabbed MDI form. Is there a recommended way of doing this? Thanks in advance! Derek

Mano J [Syncfusion]
Replied On September 29, 2005 01:35 PM

Hi Derek, I feel like it is not a very usual way of approach. Could you please provide me an exact scenario you need and more details regarding this post? Then it will be convenient for us to work with. Thanks for using Syncfusion products. Regards, Mano

Derek Price
Replied On September 29, 2005 03:20 PM

Consider the VS.NET IDE. It opens with a start page with links to recently opened projects. If you click on one of those links, it opens that project and opens any previously opened files in new tabs. But it keeps the start page open. Does this help? Derek

Mano J [Syncfusion]
Replied On September 30, 2005 02:21 AM

Hi Derek, Thanks for the details. You should set the child form''s MDIParent to the main form as follows to achieve the behavior. private void buttonAdv1_Click(object sender, System.EventArgs e) { Form3 f1 = new Form3(); // Set the new form''s MDI parent to main form f1.MdiParent = (Form1)this.Parent.Parent; f1.Show(); } Please refer to the sample attached and let me know if this meets your requirements. Thanks for using Syncfusion products. Regards, Mano F35439_9419.zip

Derek Price
Replied On September 30, 2005 09:05 AM

Thanks - that works great! I didn''t realize that there was a parent property until late last night! :) Derek


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.