private void OpenForm<T>() where T : Form, new() { T frm = (T)new List<Form>(this.MdiChildren).Find(f => f is T) ?? new T() { MdiParent = this }; frm.Show(); frm.Focus(); }
OpenForm<NewForm>();
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)