我反复使用以下代码打开表单。我想使用一个函数相同的Form名称作为参数。有人可以帮帮我吗?
frmItem frm = new frmItem();
frmItem open = Application.OpenForms["frmItem"] as frmItem;
if (open == null)
{
frm.MdiParent = this;
frm.Show();
}
else
{
open.Activate();
if (open.WindowState == FormWindowState.Minimized)
{
open.WindowState = FormWindowState.Normal;
}
}