//穷举所有窗体 FormCollection fc = Application.OpenForms; foreach (Form f in fc) { Console.WriteLine("The Form Name is:{0} ", f.Name); }