Click here to Skip to main content
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 7:01am
Edited 15-May-12 5:58am
DaveyM6979.4K
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 Sascha Lefévre 485
1 Sergey Alexandrovich Kryukov 325
2 Maciej Los 240
3 Abhinav S 164
4 Peter Leow 120
0 Sergey Alexandrovich Kryukov 6,953
1 OriginalGriff 6,311
2 Maciej Los 2,732
3 Peter Leow 2,674
4 Abhinav S 2,562


Advertise | Privacy | Mobile
Web02 | 2.8.150414.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