////// 通用的单例制作器 /// ///public class UniversalSingletonGeneator where T : Form,new() { private static T t = null; public static T CreateSingleton() { if (t == null || t.IsDisposed) { t = new T(); } t.WindowState = FormWindowState.Normal; t.Activate(); return t; } } // 测试代码 var pFrm = UniversalSingletonGeneator .CreateSingleton(); pFrm.Show();