I think whe you use My.Application.OpenForms, one can close all the applications' loaded forms but i am not getting it 100% right. Any Idea what i am getting wrong!
VB Code:
  1. Private Sub closeAllLoadedForms()
  2.         For Each f As Form In My.Application.OpenForms
  3.             'If Not f.InvokeRequired Then
  4.             'Can access the form directlt
  5.             If Not f.Name = "frmPaneled" Then
  6.                 f.Close()
  7.                 f.Dispose()
  8.             End If
  9.             'End If
  10.         Next f
  11.     End Sub