private static Form2 f2=null;

 private static Form3 f3 = null;

private void button1_Click(object sender, EventArgs e)

        {
            if (f3 != null)
            {
                f3.Hide();
            }
            if (f2== null)
            {
                f2 = new Form2();
                f2.TopLevel = false;
                f2.Parent = this.panel3;
                f2.Show();
            }
            else
            {
                f2.TopLevel = false;
                f2.Parent = this.panel3;
                f2.Show();
            }
        }
posted on 2012-12-06 14:54  Asa.Zhu  阅读(223)  评论(0)    收藏  举报