Solved

Set mdi Parent

Posted on 2006-07-03
5
425 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 250 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 250 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 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