title: How to close all dynamically created forms?
body: <p><strong>How do I close all opened forms which are created on the fly?</strong></p>
  
  <pre class="lang-vb prettyprint-override"><code>Sub OpenForms
     dim F as new frmForm1
     F.show
  
     dim F2 as new frmForm1
     F2.show
  End Sub
  
  sub CloseForms
  'doesn't work, (forms are created in a dll and ".openforms" method is not available):
  'For each f as Form in My.Application.OpenForms
  ' f.Close()
  'Next
  end Sub
  </code></pre>
  
  <p>I want to close all opened frmForm1 - any ideas?</p>