外部唯一窗体
private void ShowOrActiveForm<T>(string FormName) where T : Form, new()
{
#region
Form fm;
if (Application.OpenForms[FormName] != null)
{
fm = Application.OpenForms[FormName];
fm.Activate();
}
else
{
fm = new T();
//fm.MdiParent = this;
fm.Show();
}
#endregion
}
posted on 2012-05-08 10:39 HOT SUMMER 阅读(108) 评论(0) 编辑 收藏 举报