Solved

Set mdi Parent

Posted on 2006-07-03
5
426 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
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…

623 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