VB.Net-Forms Clossing Method
close all Forms except main form VB.Net
Private Sub close_all()Dim formNames As New List(Of String)
For Each currentForm As Form In Application.OpenForms
If currentForm.Name <> "frmmain" Then
formNames.Add(currentForm.Name)
End If
Next
For Each currentFormName As String In formNames
Application.OpenForms(currentFormName).Close()
Next
End Sub
Your Code Here
Tags:
Software