Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
5.00/5 (1 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
Updated 15-May-12 4:58am
v4

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
form1.Show()

Dim Form2 As New Form2
Form2.MdiParent = Me
Form2.Show()


And it worked as expected, Form1 appeared outwith the mdi and Form2 appeared in the mdi.
 
Share this answer
 
Hi,

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.

However,
thanks a lot!

cheers
Gabriel
 
Share this answer
 
Comments
Maciej Los 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900