容器表单中的控件会超过子表单吗? [英] Controls in container form come over child form?

查看:19
本文介绍了容器表单中的控件会超过子表单吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在容器表单中,我有菜单和按钮可以打开这些表单.

In a container form I have menu and buttons to open ther forms.

在这里,当我打开任何表单时,这些按钮和标签出现在新打开的表单上时,我遇到了问题.

Here I am facing a problem when I open any form these buttns and lables come over newly opened form.

请指导我如何处理这个问题?我想打开一个新表单并将这些容器表单的控件保留在它的后台.

Please guide me how I can manage this issue? I want to open a new form and keep these container form's controls in back ground of it.

推荐答案

我也遇到了同样的问题.我得到了如下所述的替代解决方案:

I've also got the same problem. I got an alternative solution as described below:

  1. 插入计时器控件
  2. 我已将控件添加到面板容器中
  3. 并做了以下事情

  1. Insert a timer control
  2. I've added the controls in a panel container
  3. And did the following

private void timer1_Tick(object sender, EventArgs e)
{
    if ((int)MdiChildren.GetLength(0) > 0)
    {
        panel1.Visible = false;
    }
    else
    {
        panel1.Visible = true;
    }
}

这篇关于容器表单中的控件会超过子表单吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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