title: How do I unload all open forms in VB.NET?
body: <p>In the middle of converting VB6 code to VB.NET, I need to replace the following code that intends to close all open forms remaining in the application.</p>
  
  <pre><code>'close all sub forms
  For i = My.Application.OpenForms.Count - 1 To 1 Step -1
      'UPGRADE_ISSUE: Unload Forms() was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="875EBAD7-D704-4539-9969-BC7DBDAA62A2"'
      Unload(My.Application.OpenForms(i))
  Next i
  </code></pre>
  
  <p>I've replaced the <code>Unload</code> function with <code>Close</code> (as indicated by <em>TFM</em>), but the compiler complains that <code>OpenForms</code> is not a member of <code>My.Application</code>.</p>
  
  <p>Where can I access the open forms?</p>