李晶,我用了你的代码,但是我用2个用户向一个用户发送信息的时候,第二个发送用户发送信息的时候,发送方会出现假死的状态,接受方把接收窗口关闭,能恢复一下,但是如果发送方继续发,还会出现上述的状况,但是,如果接受方主动打开窗口就能,就能正常发送,希望李晶和其他朋友多指教。

解决方案 »

  1.   

    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