title: Dynamically create instance of a form and show it
body: <p>I created a dictionary:</p>
  
  <pre><code>Public DicForms As New Dictionary(Of String, Form)
  DicForms.Add("FrmAbout", FrmAbout)
  DicForms.Add("FrmAddAcGroup", FrmAddAcGroup)
  '..
  '..
  'upto 71 items
  </code></pre>
  
  <p>Following is my module function to show a form inside MDIParent:</p>
  
  <pre><code>Public Sub OpenForm(ByVal frm As Form)
      With frm
          .MdiParent = FrmMain
          .Show()
          .Focus()
      End With
  End Sub
  </code></pre>
  
  <p>And I'm trying to open a Form that available in dictionary <code>DicForms</code>:</p>
  
  <pre><code>'FormName = "FrmAbout"
  If Not formName Is Nothing Then
      If DicForms.ContainsKey(formName) Then
          Dim fmr As New Form
          fmr = DicForms.Item(formName)
          OpenForm(DicForms.Item(formName))
      End If
  End If
  </code></pre>
  
  <p>If a form is opening for first time, it'll show. But when opening the same form, for example when I try to open <code>FrmAbout</code> for first time, it'll show but for the second time, I'm getting an error:</p>
  
  <p><code>Cannot access a disposed object. Object name: 'FrmAbout'</code></p>
  
  <p>What I've done so far:</p>
  
  <pre><code>If Not formName Is Nothing Then
      If DicForms.ContainsKey(formName) Then
          Dim frm As New Form
          frm = DicForms.Item(formName)
          OpenForm(DicForms.Item(formName))
      End If
  End If
  </code></pre>
  
  <p>But this doesn't working as I expected : it's showing the same error.</p>