If htForms.ContainsKey(Form_ID) Then Try Dim existForm As CreateForm = CType(htForms(Form_ID), CreateForm) existForm.writeMsgToRichTxbx(MsgContents) existForm.myForm.Show() Catch ee As Exception MessageBox.Show(ee.ToString()) End Try Else Dim talkForm As New CreateForm(otherName, Form_ID, otherName, MsgContents) htForms.Add(Form_ID, talkForm) talkForm.myForm.ShowDialog() End If
Try
Dim existForm As CreateForm = CType(htForms(Form_ID), CreateForm)
existForm.writeMsgToRichTxbx(MsgContents)
existForm.myForm.Show() Catch ee As Exception
MessageBox.Show(ee.ToString())
End Try
Else
Dim talkForm As New CreateForm(otherName, Form_ID, otherName, MsgContents)
htForms.Add(Form_ID, talkForm)
talkForm.myForm.ShowDialog()
End If