更改.net中MDI容器表单的背景色或背景图像 [英] Change backcolor or background image of a MDI Container form in .net
本文介绍了更改.net中MDI容器表单的背景色或背景图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在我的应用程序中更改MDI父级的背景色或背景图像.我尝试更改背景色或指定背景图片,但无法正常工作.我还尝试了循环窗体中的控件以获取mdiclient并更改其背景色,也将零个相同的结果.
i need to change the backcolor or background image of a mdi parent in my application. i tried changing the backcolor or specifying a background image, it won't work. i also tried looping the controls in the form to get the mdiclient and change its backcolor, also zero same result.
推荐答案
Private ClientControl As MdiClient
Public Sub New()
InitializeComponent()
ClientControl = Nothing
For Each Ctl As Control In Me.Controls
ClientControl = TryCast(Ctl, MdiClient)
If ClientControl IsNot Nothing Then Exit For
Next
End Sub
'iN FORM LOAD
ClientControl.BackColor = Color.Cyan
这篇关于更改.net中MDI容器表单的背景色或背景图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文