private void lkRegister_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Form test = Application.OpenForms["frmrg"]; //查找是否打开过该子窗体 if ((test == null) || (test.IsDisposed)) //未找到则新创建 { FrmMian frmrg = new FrmMian(); frmrg.Show(); } else//否则聚焦该窗口 { test.Activate(); } }
private void btnAdd_Click(object sender, EventArgs e)//进入注册界面 { FrmMian reg = new FrmMian(); reg.Show(); }