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:
Private Sub closeAllLoadedForms() For Each f As Form In My.Application.OpenForms 'If Not f.InvokeRequired Then 'Can access the form directlt If Not f.Name = "frmPaneled" Then f.Close() f.Dispose() End If 'End If Next f End Sub




Reply With Quote