将Form置入splitContainer的panel中

image

private void button1_Click_1(object sender, EventArgs e)
        {
            Form2 form = new Form2();
            form.FormBorderStyle = FormBorderStyle.None;
            form.TopLevel = false;
            splitContainer1.Panel2.Controls.Clear();
            splitContainer1.Panel2.Controls.Add(form);
            form.Show();
        }

posted @ 2019-02-21 21:43  崇尚技术  阅读(312)  评论(0编辑  收藏  举报