For Each frm As WinForm.Form In forms If frm.Formstyle = 2 AndAlso frm.name <> "窗口1" Then frm.close End Ifnext