日期:2014-05-17 浏览次数:20846 次
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
switch (e.Node.Name)
{
case "Node1":
Form1 F1 = new Form1();
F1.TopLevel = false;
F1.FormBorderStyle = FormBorderStyle.None;
F1.WindowState = FormWindowState.Maximized;
panel显示.Controls.Add(F1);
F1.Show();
break;
case "Node2":
Form2 F2 = new Form2();
F2.TopLevel = false;
F2.FormBorderStyle = FormBorderStyle.None;
F2.WindowState = FormWindowState.Maximized;
panel显示.Controls.Add(F2);