WinForm 子窗体在父窗体范围内移动,不能出父窗体 摘自于网络

详细解释:1, 主窗体Form1属性IsMdiContainer设为True,并添加ToolStrip控件, Toolstrip中添加一个按钮toolStripButton1。 
        2,添加新窗体Form2。 
          3,主窗体Form1中toolStripButton1的Click事件 
          private void toolStripButton1_Click(object sender, EventArgs e) 
        { 
            Form2 f2 = new Form2(); 
            f2.MdiParent = this; 
            f2.Show(); 
        } 
最后看效果吧!

posted @ 2014-07-30 10:16  秋水惜朝  阅读(647)  评论(0编辑  收藏  举报