首页 > 编程溢出 > 点击一个button按钮使窗体2显示在窗体1中C#代码

点击一个button按钮使窗体2显示在窗体1中C#代码

 来自:neeao Blog

1
2
3
4
5
6
7
8
9
10
11
 
private void button1_Click(object sender, EventArgs e)
        {
            this.tableLayoutPanel1.Controls.Clear();
            Form2 frm = new Form2();
            frm.TopLevel = false;
            this.tableLayoutPanel1.Controls.Add(frm);
            frm.Parent = this.tableLayoutPanel1;
            frm.FormBorderStyle = FormBorderStyle.None;
            frm.Show();
        }
分类: 编程溢出 标签:
  1. 2009年6月20日17:09 | #1

    不给个效果看看嘛 光标题还真不大明白

  1. 本文目前尚无任何 trackbacks 和 pingbacks.