private ChildFrm myChildFrm; //定义子窗口对象
        private void button1_Click(object sender, EventArgs e)
        {
            
if(myChildFrm == null || myChildFrm.IsDisposed)
            {  
            myChildFrm 
= new ChildFrm();
            }
            
this.IsMdiContainer = true;   
            myChildFrm.MdiParent 
= this//建立父子关系
            myChildFrm.Show(); //显示子窗口
            myChildFrm.Focus(); //子窗口获得焦点

        }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2021-10-10
  • 2021-08-27
  • 2022-02-08
  • 2021-08-22
  • 2022-02-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
相关资源
相似解决方案