为什么无法做到隐藏子窗体
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplicationMDIset
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
[color=#FFCC00] private void button1_Click(object sender, EventArgs e)
{
Form2 frm2 = new Form2();
frm2.Show();
frm2.MdiParent = this;
Form3 frm3 = new Form3();
frm3.Show();
frm3.MdiParent = this;
Form4 frm4 = new Form4();
frm4.Show();
frm4.MdiParent = this;
}
private void button2_Click(object sender, EventArgs e)
{
Form3 frm = new Form3();
frm.Hide();
frm.MdiParent = this;
}[/color]
}
}