为什么无法做到隐藏子窗体

AHuangTM 2016-04-22 06:45:46
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]
}
}
...全文
72 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

111,129

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧