MDI Parent Backcolor

  • Thread starter Thread starter Joe Fallon
  • Start date Start date
J

Joe Fallon

I have a MDI form and I can open child forms in it without any trouble.

The MDI container background is almost black. I wanted to change the color
to something else but nothing seems to work. I tried using the Backcolor
property of the MDI form but it had no effect. What is it supposed to do? Is
there a way to change the color or not?

Thanks!
 
* "Joe Fallon said:
I have a MDI form and I can open child forms in it without any trouble.

The MDI container background is almost black. I wanted to change the color
to something else but nothing seems to work. I tried using the Backcolor
property of the MDI form but it had no effect. What is it supposed to do? Is
there a way to change the color or not?

<http://vbaccelerator.com/article.asp?id=4306>
 
Module Main

Public Sub main()
Dim frm As New Form
frm.IsMdiContainer = True
frm.WindowState = FormWindowState.Maximized
For Each cnt As Control In frm.Controls
If TypeOf cnt Is MdiClient Then
cnt.BackColor = Color.MediumSlateBlue
Exit For
End If
Next
frm.ShowDialog()
End Sub

End Module

HTH,
Bob
 
or just throw this into the MDI containers load event

\\\
For Each cnt As Control In Me.Controls
If TypeOf cnt Is MdiClient Then
cnt.BackColor = Color.MediumSlateBlue
End If
Next cnt
///
 
I will test it tomorrow. Thanks!

I think the confusing thing is the terminology.
MdiClient to me means a child form that opens within the MDI main form.
But it seems you are saying here that it is really the black background form
that I have been trying to change.


Any idea what the Backcolor property of the main MDI form is for?
 
* "Joe Fallon said:
I think the confusing thing is the terminology.
MdiClient to me means a child form that opens within the MDI main form.
But it seems you are saying here that it is really the black background form
that I have been trying to change.

The background color depends on the system color settings, on my
computer its a dark gray.
Any idea what the Backcolor property of the main MDI form is for?

Maybe it's inherited, but not implemented.
 
Back
Top