在MDI子窗体里怎么遍历MDI窗体里的所有控件? 在MDI子窗体里怎么遍历MDI窗体里的所有控件?或都在MDI子窗体里怎么访问主窗体里的statusStrip控件?(我把MDI主窗体的控件的statusStrip控件的Modifiers属性设为Public了还是不行) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 foreach(Control in sheetForm.Controls){ if (Control is System.Windows.Forms.StatusStrip) { ..... }} foreach(Control ctrl in sheetForm.Controls){ if (ctrl is System.Windows.Forms.StatusStrip) { ..... }} (childform.MDIParent as XXXForm).statusStrip1... 我是这样的: foreach (Control tl in FrmMain.ActiveForm.Controls) { if (tl.Name == "statusStripMain") { foreach (Control ts1 in tl.Controls) { if (ts1.Name == "toolStripStatusLabel1") ts1.Text = "aaa"; //操作员名称 } } }但是怎么也找不到statusStripMain里的toolStripStatusLabel1 问题解决了,只能在MDI窗体里加个label,然后在change事件里处理! vs安装问题 谁能详细的讲解下类的构造函数 异步加载数据,方法2和4造成界面假死,方法3造成DataGridView滚动条不可用,那位大侠能帮我解决一下。 百分求Infragistics NetAdvantage 2006 vol3 下载 C#Form的图标如何在通知区域里显示??? 怎样让鼠标移动到ImageButton按钮时,ImageButton1能改图片 子窗口返回数据给父窗口 请问怎样使label的背景透明? 求助攻 C# post请求出错 请问,我的其他窗体右下角怎么有个可以拖拉改变窗体大小的东西,而主窗体却没有,这个东西怎么去掉??? 急求键盘事件解决问题 请教个问题
{
if (Control is System.Windows.Forms.StatusStrip)
{
.....
}
}
{
if (ctrl is System.Windows.Forms.StatusStrip)
{
.....
}
}
foreach (Control tl in FrmMain.ActiveForm.Controls)
{
if (tl.Name == "statusStripMain")
{
foreach (Control ts1 in tl.Controls)
{ if (ts1.Name == "toolStripStatusLabel1")
ts1.Text = "aaa"; //操作员名称
}
} }
但是怎么也找不到statusStripMain里的toolStripStatusLabel1