Post by Serge3984 on Mar 11, 2004 5:33:33 GMT -5
Hi
I have a problem to make a Msn Chat connexion. My winsock controls get nothing anymore
I have 2 winsock control, a webbrowser, and a rich text box my source code start like this
following the code of C:\room.html
But nothing appear in my rtb
Thanks for helping
Seb
I have a problem to make a Msn Chat connexion. My winsock controls get nothing anymore
I have 2 winsock control, a webbrowser, and a rich text box my source code start like this
Private Sub Form_Load()
winConnection.Connect "207.68.167.251", 6667
End Sub
Private Sub winConnection_Connect()
If winEcoute.State <> sckClosed Then winEcoute.Close
winEcoute.LocalPort = 6667
winEcoute.Listen
webBrowser.Navigate "C:\room.html"
End Sub
following the code of C:\room.html
<html>
<head>
<title>Msn Chat Group Client</title>
</head>
<body>
<TABLE width='100%' border='0' cellspacing='0' cellpadding='0'>
<TR>
<TD width='100%'>
<OBJECT ID='ChatFrame' CLASSID='CLSID:F58E1CEF-A068-4c15-BA5E-587CAF3EE8C6' width='100%'>
<PARAM NAME='MSNREGCookie' VALUE=''>
<PARAM NAME='PassportTicket' VALUE=''>
<PARAM NAME='PassportProfile' VALUE=''>
<PARAM NAME='RoomName' VALUE='G_planetamour'>
<PARAM NAME='Server' VALUE='207.68.167.251:6667'>
<PARAM NAME='BaseURL' VALUE='http://chat.msn.com/'>
<PARAM NAME='URLBack' VALUE=''>'
<PARAM NAME='CreateRoom' VALUE=''>
<PARAM NAME='ChatHome' VALUE=''>
<PARAM NAME='Feature' VALUE='12'>
<PARAM NAME='Category' VALUE='UL'>
<PARAM NAME='ChatMode' VALUE=2>
<PARAM NAME='BackColor' VALUE=&hFFFFFF>
<PARAM NAME='AuditMessage' VALUE=''>
<PARAM NAME='MessageOfTheDay' VALUE=''>
<PARAM NAME='ResDLL' VALUE=''>
</OBJECT>
<SCRIPT LANGUAGE='JavaScript'>
function fnResize() {
newheight=document.body.clientHeight-185;
if (newheight<252)
newheight=400;
document.all('ChatFrame').style.pixelHeight=newheight;}
window.onresize=fnResize;
fnResize();
</SCRIPT>
</TD>
</TR>
</body>
</html>
Private Sub winEcoute_ConnectionRequest(ByVal requestID As Long)
If winEcoute.State <> sckClosed Then winEcoute.Close
winEcoute.Accept requestID
End Sub
Private Sub winEcoute_DataArrival(ByVal bytesTotal As Long)
Dim sData As String
winEcoute.GetData sData, vbString
rtblog.SelStart = Len(rtblog.Text)
rtblog.SelText = "Ecoute : " & sData & vbCrLf
End Sub
But nothing appear in my rtb
Thanks for helping
Seb