Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Set mdi Parent

Posted on 2006-07-03
5
Medium Priority
?
428 Views
Last Modified: 2008-02-01
Hi,

Where and how do I set the mdi Parent for any form I add to my project.

thanks in advance

Andrew
0
Comment
Question by:REA_ANDREW
  • 3
5 Comments
 
LVL 12

Expert Comment

by:gbzhhu
ID: 17031173
use the IsMDIContainer property and set it to true
0
 
LVL 20

Author Comment

by:REA_ANDREW
ID: 17031207
hi, thanks for that. What I am looking for though.

I have set My Parent form to be the mdiContainer, but I do not know how to give it children. How do I code the following.

Setting a form to be an MdiChild
Activating a child to appear inside the parent.

Thanks in advance

Andrew
0
 
LVL 12

Expert Comment

by:gbzhhu
ID: 17031263
<childform>.Parent = <parentform>;

where childform is the form you want to be child form and parentform being the parent form
0
 
LVL 3

Accepted Solution

by:
Bowmanje earned 1000 total points
ID: 17031267
You need to set the MdiParent property, and then use the .Show() method...

Form frmchild=new Form();
frmchild.MdiParent=this;
frmchild.Show();

Another relevant property is the ActiveMdiChild property of the parent.  It will allow you to determine which child has focus.

HTH,
-Josh
0
 
LVL 12

Assisted Solution

by:gbzhhu
gbzhhu earned 1000 total points
ID: 17031269
Look here for quick example

http://www.c-sharpcorner.com/winforms/MDIformssampPSD.asp

Loads of samples on the web, just type mdi c# in google
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question