在Dotnet中形成窗体 [英] windows forms in Dotnet

查看:63
本文介绍了在Dotnet中形成窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生/女士,



我可能知道如何找到 splitcontainer1.panel2 <中显示的表格 / b>。以及如何在运行时设置该表单 backcolor

我无法解决这个问题。如果你不是我可能我知道吗?





谢谢你...

hi sir/madam,

may i know how to find the form that is displayed in splitcontainer1.panel2 . and also how to set that form backcolor at runtime.
I am not getting the way to solve this. if u don't mine may i know?


thank u...

推荐答案

看看这个



http://social.msdn.microsoft.com/Forums/windows/en-US / d9db8a1e-3715-4d3a-84c8-4419ed89b9ed / how-to-set-color-of-split-in-splitcontainer-control [ ^ ]


查看splitContainer1.panel2.Controls集合 - 它列出了面板将显示的所有控件。
Look at the splitContainer1.panel2.Controls collection - it lists all controls the panel will display.


try下面:

try below:
foreach (Control ctrl in splitcontainer1.panel2.Controls)
{
    if (typeof(ctrl) == typeof(Form1))
    {
    }
    else if (typeof(ctrl) == typeof(Form2))
    {
    }
    //else if ...
}


这篇关于在Dotnet中形成窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆