Click here to Skip to main content
11,640,599 members (59,497 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB9.0 .NET
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
Edited 15-May-12 4:58am
DaveyM6980.7K
v4
Rate this: bad
good
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
        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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Comments
losmac at 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
0 Mika Wendelius 370
1 OriginalGriff 205
2 Afzaal Ahmad Zeeshan 130
3 CPallini 125
4 DamithSL 105
0 Mika Wendelius 370
1 OriginalGriff 205
2 CPallini 125
3 DamithSL 105
4 Afzaal Ahmad Zeeshan 70


Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 15 May 2012
Copyright © CodeProject, 1999-2015
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