If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

A: Eventhough there is a BackColor property in the Properties Window, it will not work as expected. Select the BackColor property in the Properties Window, and set it to a different color. You will not see the color of the MDI Form change in the Form designer.
You have to type the following code into the MDI Form's Load event as well:

Code:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ctl As Control
Dim ctlMDI As MdiClient
' Loop through all of the form's controls looking
' for the control of type MdiClient.
For Each ctl In Me.Controls
Try
' Attempt to cast the control to type MdiClient.
ctlMDI = CType(ctl, MdiClient)
' Set the BackColor of the MdiClient control.
ctlMDI.BackColor = Me.BackColor
Catch exc As InvalidCastException
' Catch and ignore the error if casting failed.
End Try
Next
End Sub

Q: How do I add a Background picture to the MDI Parent form?

A: Simply set the BackgroundImage property of the MDI form, to the picture you want. The picture will be tiled, once run.

Q: How do I check if an MDI Child form already exists, so that we don't show the same form twice ?

A: Inside the method from which you want to check (possibly a Menu item click, or toolbar) type the following :

Code:

For Each f As Form In Me.MdiChildren
If f.Text = "Form2" Then
MessageBox.Show("It already exists!")
Exit Sub
End If
Next
Dim f2 As New Form2
f2.MdiParent = Me
f2.Show()