Can't Open A Non MDI Form On The Same Screen As The MDI Parent - vb.net

I am working with MDI forms and have an MDI Parent opening different MDI Children. On one particular MDI Child I want to open a normal window on the same screen as the Child, but when I move the MDI parent to a new screen, the normal window continuously opens on the primary screen.
I have tried a multitude of diffent things but can't seem to resolve it.
Does anyone have any suggestions?
The form is about 4 levels down. So from the Parent, I have opened a Child, then from that Child I have opened another form inside the Parent, and from there I want to open another form that sits on top of everything at a specific location. I also want to be able to close this form using the 'Deactivate' method so it can't be a ShowDialog from as far as I can see.
Hope that all makes sense. Thanks

You must make this form a child of the parent. You can do this by using
Form.MDIParent = Me.MDIParent
Form.Show
That should do the trick.

Related

vb.net mdi child is hidden behind MDI Parent Panels

I am planning to have a vb.net windows form applocation that has a main mdi ( contains menu strip + panels all over the mdi )
the problems is when a child form is shown , and when minimizing the child form it disappears behind the main mdi.
any ideas how to solve this without changing the size of the child form
MDI Issue

Mdi Child Form Location Changes after minimizing

I had an vb.net desktop application which uses MDIForm.In that application all the child formes are in maximized state.When i am open any form and minimized,then that child form gets minimized and no problem for for the first time.Then i have to maximize and minimize the same form then there is an automatic vertical scroll appears on MDI Form.And also the location of child form goes downwards.Similar Problem happends for other forms also.
see the attached image
enter image description here

VB.NET multiple MDI child forms: Is it possible to have some maximized and others not?

anybody use .NET MDI containers much?
I've got an MDI Parent form that creates a bunch of smaller MDI child forms within it after a user clicks a toolbar. The child forms are all set to have the maximize button, and when clicked, they fill the parent container. But here's my problem:
Once you maximize one child, all of the subsequent child forms you open are maximized as well. Likewise, if you have several child forms open and maximized, clicking the shrink window button shrinks all of them.
Anyway to get around this?
Thanks,
Elliot
Sounds like this could break alot of things you would not want to break
http://social.msdn.microsoft.com/Forums/en/winforms/thread/4760c883-f789-4b91-8843-38863ad3add2
you might want to try a different approach

VB.NET MDI Children Focus only on Title Bar Click

One would imagine that clicking anywhere within the MDI Child form (or on any control) will focus that form. But in my application I can only focus a MDI child by clicking on its titlebar, which is an abnormal behavior on the part of the user. My forms are filled with either controls or panels so I don't have the luxury of just "clicking on the form." But clicking anywhere within it should focus it.
I haven't been able to find a solution to this problem although it seems others are having it as well.
I figured it out. If you are setting the child form mdiParent property after you are calling Form.Show then it messes up the focus of all the child forms.
When I set mdiParent property of the form first and then call .Show(), everything works perfectly as expected.

Why is MDI parent occasionally not minimizing?

I have a MDI parent that opens another form like this:
Dim frm As New Form1
frm.ShowDialog(Me)
That form has a button that, when clicked, does this:
CreateObject("Shell.Application").ToggleDesktop()
The button operates as expected (showing the desktop) most of the time but occasionally does not minimize the MDI parent. All the other windows, including the form above get minimized every time.
Why is this happening, and how do I fix it?
Instead of trying to allow a form shown with ShowDialog I changed the angle from which I'm approaching. I'll show the form with Show and assign the MdiParent and just fake the modality of the form instead. The fake modal will disable all other parts of the MDI parent except the system buttons in the title bar. If the user attempts to close the MDI parent, the "modal" window will beep once and blink the title bar a bit.