Skip to main content

Posts

Showing posts from October, 2022

how do i close all forms except main form 2022-TechbyMati

VB.Net-Forms  Clossing Method Contents 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