Click here to Skip to main content
13,002,000 members (75,406 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I'm trying to set up a Midi application. I've got a MID-Form and some other forms which should show up as children.

But Calling the show() method (after setting childform.mdiparent to the Mid-Form) does not result in the desired effect. They show modal/ as popup.

If I just instance a blank form, this works.

Is there any property to put attention to or something else that prevents a form from being shown as a child?

[Edited to remove MIDI tag!]
Posted 28-Nov-09 6:01am
Updated 15-May-12 4:58am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I just created a windows forms project. Added an MDIForm, and 2 forms, dropped a button on the MDI surface and in the click event for the button did the following;
        Dim form1 As New Form1
        Dim Form2 As New Form2
        Form2.MdiParent = Me

And it worked as expected, Form1 appeared outwith the mdi and Form2 appeared in the mdi.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


I finally found the error...

I created an instance of Form2 (lets say _F2), but I did not set the instances (_F2) property MDIparent to Form1, but Form2's property (class itself). VB did not throw an exeption and it took me a while until I discovered the mistping.

thanks a lot!

losmac 15-May-12 11:00am
Please, mark this question as "solved".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 15 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100