Vb.Net MDI Back Image
-
Hello every body. I have a problem with the image adding on an MDI container in vb.net. Image looks fit. But when a child form is opened it hides behind the image box control. Can any body suggest me about the problem. And how to solve it. I shall be grateful to you...... FIRE
-
Hello every body. I have a problem with the image adding on an MDI container in vb.net. Image looks fit. But when a child form is opened it hides behind the image box control. Can any body suggest me about the problem. And how to solve it. I shall be grateful to you...... FIRE
Yeah, that's been coverd dozens of times in the forums. ANy control you put on the MDI parent will show ABOVE any MDI Child forms. This is because there is a hidden control in the MDI Parent that actually serves as a container for the child forms. Any control you put on the MDI Parent form will be over the top of this hidden control. You can read more about the MDIClient contorl, here[^]. If you closely enough at that documentation, you'll find it even has it's own BackgroundImage property. All you have to do is interate through the controls on your form and find the only instance of an
MDIClient
control, cast a variable to it, then set itsBackgroundImage
property.If Me.Controls.Count Then
For Each control As Control In Me.Controls
If TypeOf control Is MdiClient Then
Dim mdiClientArea As MdiClient = CType(control, MdiClient)
mdiClientArea.BackgroundImage = New Bitmap("filepath")
Exit For
End If
Next
End IfRageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome