作为标题,我试图关闭所有打开的表单,除了 VB.Net 中的一些表单,但表单没有关闭。这是我使用的代码:
Dim lista As New FormCollection
lista = Application.OpenForms
For Each a As Form In lista
If Not a.Text = "formLogout" And a.Text = "arresto" And a.Text = "riavvio" And a.Text = "formOpen" Then
a.Close()
End If
Next
scrivania.Close()
Me.Close()
格拉齐。