yeah like when yah send the stuff you want to send you could do something like
TxtGeneral(2).Text is the text you would be sending here in this caseVB Code:
If Not SockChat.State = sckClosed Then SockChat.SendData TxtGeneral(2).Text
then you would need to set up a data arival so when yah send the text you will get have to recieve as well
as for me i prewrite handles in mods makes my form code look clean and using handles to me is the way i would go and in your data arrival you just call on the handle and it takes care of all your stuff for you
example
VB Code:
' data arrival in your form would be like this Private Sub SockChat_DataArrival(ByVal bytesTotal&) Dim Data$ SockChat.GetData Data Debug.Print Data Call Handle (Data, SockChat) End Sub 'example of what a handle looks like if ah dont know Public Sub ChatHandle(Data$, YahooYcht As Winsock) 'handles the data Select Case Mid(Data, 12, 1) Case Chr(&H1) With FrmMain .CmdGeneral(0).Caption = "Logout" .StatusBar.SimpleText = "Logined In..Ready to join chat.." End With Case Chr(&H11) If InStr(1, Data, "vcauth=") > 0 And InStr(1, Data, "rmspace=") > 0 Then If Mid(Data, 17, 11) = "Join Failed" And Mid(Split(Data, "À€")(3), 1, 11) = "/c/ad.html?" Then ChatRoom = Split(Data, "À€")(1) Else ChatRoom = Mid(Data, 17, Len(Data) - 16) ChatRoom = Split(ChatRoom, "À€")(0) End If VoiceToken = Split(Data, "vcauth=")(1) VoiceToken = Split(VoiceToken, "&" & Chr(&H2E))(0) RoomSpace = Split(Data, "rmspace=")(1) RoomSpace = Split(RoomSpace, "À€")(0) End If Case Chr(&H2) With FrmMain .SockAuth.Close YahooYcht.Close .CmdGeneral(0).Caption = "Login" End With End Select End Sub
well i hope this kinda helps you out maybe if you have a source post it and ill have a look at it for yah and maybe comment in it and explain it better




Reply With Quote