VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A basic chat script its really easy to use and if you have any problems on making your own chat the

by Corey-Jay (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 7th March 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

A basic chat script its really easy to use and if you have any problems on making your own chat then e-mail me at [email protected]

API Declarations


Create 2 text boxes

make Text1 bigger then Text2

make a Host command button
Make a Connect

Put a Text3 to put IP in

And add One winsock1


Rate A basic chat script its really easy to use and if you have any problems on making your own chat the




Private Sub Command1_Click() ' Send Button
Winsock1.SendData (Text2.Text)
End Sub

Private Sub Command2_Click() ' Host Button
Winsock1.LocalPort = Port
Winsock1.Listen
End Sub


Private Sub Command3_Click() ' Connect Button
Winsock1.RemotePort = Port
Winsock1.RemoteHost = text3.text
Winsock1.Connect
End Sub



Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim data As String
Winsock1.GetData data
Text1.Text = Text1.Text + vbCrLf + data
End Sub

Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Form1.Caption = "No Connection"
End Sub



Download this snippet    Add to My Saved Code

A basic chat script its really easy to use and if you have any problems on making your own chat the Comments

No comments have been posted about A basic chat script its really easy to use and if you have any problems on making your own chat the. Why not be the first to post a comment about A basic chat script its really easy to use and if you have any problems on making your own chat the.

Post your comment

Subject:
Message:
0/1000 characters