|
-
Oct 31st, 2005, 09:07 AM
#1
Thread Starter
Fanatic Member
winsock array - help needed.
i created a multichat app with winsock array it seems to work fine.
say i have 3 clients connected namely client1,client2 and client3 respectively.
if client1 send private message to client2, it checks whether a private message window hasn't already been open with client1 on client2's machine. if not it opens a new window
else
it displays the data in the opened window.
it works fine.
now how do you do that with the server
say client1 sends a message to the server machine, it must do the same thing as client2 machine above.
i tried it it just keeps opening new window
what do i do.
-
Oct 31st, 2005, 09:34 AM
#2
Re: winsock array - help needed.
you've just asked a question which no-one could answer without guessing :-/
You will need to post code, tell su the problems. screenshots etc.
Pino
-
Nov 1st, 2005, 08:27 PM
#3
Thread Starter
Fanatic Member
Re: winsock array - help needed.
VB Code:
Private Sub wsckarr_DataArrival(ByVal lngIndex As Long, ByVal strData As String)
dim strMsgarr() as string
dim NewPM as New frmPM
strMsgarr = split(strData, chr(59)) ' chr(59) here is ";" character without the quotation marks
'Searches through the PM's to see if an open message is already open with the user
For i = 0 To 30
If NewPM(i).Caption = strMsgarr(3) Then
'If it is, it simply adds the text to that window, then exits this function
strPMMsg = strMsgarr(1) & strMsgarr(3) & strMsgarr(2)
NewPM(i).txtMessage.Text = strPMMsg
Exit Sub
End If
Next i
'If not, it simply adds the text, and pops open a new window.
NewPM(intPmCount).Caption = strMsgarr(3)
strPMMsg = strMsgarr(1) & strMsgarr(2) & strMsgarr(3) & vbCrLf
NewPM(intPmCount).txtMessage.Text = strPMMsg
Load NewPM(intPmCount)
NewPM(intPmCount).Show
intPmCount = intPmCount + 1
End Sub
Last edited by modpluz; Nov 1st, 2005 at 08:47 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|