Solved

MDI Forms and C#

Posted on 2006-10-24
6
353 Views
Last Modified: 2008-02-01
I'm sure this is a very very simple question.  How do you set up a MDI Form with child forms contained in the Parent?  I set up the MDI, but all of the child forms can be moved outside of the MDI.

Thanks,

jocasio
0
Comment
Question by:Juan Ocasio
  • 2
  • 2
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 17798705
Hi jocasio123,

In VB.Net, we do this:
            Dim f As New fClientUHMS
            f.MdiParent = Me
            f.Show()

It should be much the same in C#.

Cheers!
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 25 total points
ID: 17799218
C# equivalent of emoreau's post:

    SomeChildForm f = new SomeChildForm();
    f.MdiParent = this;
    f.Show();
0
 
LVL 14

Author Comment

by:Juan Ocasio
ID: 17799342
Can this be done through the IDE?  In 6.0 (VB) you could set the child prop to True.  Is there a property similar?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 17799353
Nope...it's done at run-time.
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 25 total points
ID: 17799424
>>In 6.0 (VB) you could set the child prop to True.

In VB6, you were deciding at design time if the form was to be child or not.

Now in .Net, this setting is only available at runtime and this is a good thing. You can decide if a form will be a child or not depending on some other condition. For example, experienced users prefers non-MDI windows.
0
 
LVL 14

Author Comment

by:Juan Ocasio
ID: 17800609
Thanks..Will investigate your suggestions
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

679 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