日期:2014-05-18 浏览次数:20714 次
// 设置父窗体为Mdi容器 this.IsMdiContainer = true; // 创建子窗体实例 ChildForm frm = new ChildForm (); // 设置子窗体的Mdi父窗体对象 frm.MdiParent = this; // 打开子窗体 frm.Show(); //关闭子窗体 this.MdiChildren[0].Close();
------解决方案--------------------
问题2:
private void timer_Tick(object sender, EventArgs e) { this.Close(); } // private void Form_Load(object sender, EventArgs e) { Timer timer = new Timer(); timer.Interval = 30000; timer.Tick += new EventHandler(timer_Tick); }