vb.net mdi child is hidden behind MDI Parent Panels - vb.net

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

Related

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

How to use PictureBox with MDI form?

I have an MDI windows form and many child windows forms in vb.net. What exactly done that the Mdi form have a PictureBox control over it. If I call a child form from mdi form then PictureBox of MDI form overlap the child form mean it hides the child form behind the PictureBox of MDI windows form.
How to send PictureBox behind windows forms?
This is how i approached the situation.
Since i am using a MDI-Parent Form and other Child Forms, I thought to Show() the picture box (pbImage.Show()) when the MDI Parent Control is doing nothing. If we open a new Child form, then we Hide() the pictureBox. Worked for me.
There are some facts about MDI Container Form that you should know:
The client area of the form is filled by MdiClient control which hosts all MDI children. So if you add a Control to the MDI parent, it will be located in front of the MdiClient and so it will be shown in front of MDI child forms.
You can not add any control to MdiClient control. It just allow adding MDI child forms.
To show a picture in MDI parent, you can set BackgroundImage and BackgrroundImageLayout, for example:
Dim mdiClient = Me.Controls.OfType(Of MdiClient)().First()
AddHandler mdiClient.Resize, Sub(s, a) mdiClient.Invalidate()
Me.BackgroundImage = My.Resources.SomeImage
Me.BackgroundImageLayout = ImageLayout.Center

Can't Open A Non MDI Form On The Same Screen As The MDI Parent

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.

preventing mdi child forms from displaying menustrip when not active

I have an MDI container which has a menustrip of its own. I have three child forms which (can) be displayed in the MDI container. All three of these forms have their own menus. The child form which is active has its menu displayed along the menu items from the MDI form but the other two forms (those forms which aren't active) will then display their own menu items. How can I prevent this?
When a child form is not active, I just want the menustrip of that form to be empty. Once I make the form active, it can display its menu items in the MDI form menustrip.

VB.NET Picturebox on top of MDI Child

Any idea why a picturebox in a MDI parent would show on top of a MDI child? (even when MDI child = topmost)
When calling picturebox.SendToBack the picturebox disappears in the MDI parent.
What I did was, created a borderless form with the picturebox on it, and threw it on the MDI parent as a MDI child, seems to do the job!