[RESOLVED] recive message
I have a program and it recives messages from more than one person. How would I make it so each message pops up in a new form and like messages from the same user go in the same window.
Here is some code for the message reciveing
VB Code:
Private Sub Message(strName As String, strMsg As String)
Dim frm As Form
Dim blnExist As Boolean
For Each frm In Forms
If UCase(frm.Caption) = UCase(strName) Then
blnExist = True
Exit For
End If
Next frm
If blnExist = False Then
Dim newfrm As New Form2
newfrm.Caption = strName
newfrm.Tag = strName
newfrm.Text1.Text = newfrm.Text1.Text & strName & " - " & strMsg & vbNewLine
newfrm.Show (vbNormal)
End If
If blnExist = True Then
If newfrm.Tag = strName Then
newfrm.Text1.Text = newfrm.Text1.Text & strName & " - " & strMsg & vbNewLine
End If
End If
End Sub
That makes it so the new messages show in a new window and everything but only the first message works. Ill try to explain it better if that doesnt make sense.
Re: [RESOLVED] recive message
No problem, enjoy it! :wave: