Solved

Set mdi Parent

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now