VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Chat application

by Vikramjit Singh (4 Submissions)
Category: Internet/HTML
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (38 Votes)

Create a simple chat application betweenany two computers whose IP addresses you know. The DEMO here shows how to chat with your own computer .you can substitute your own IP with that of another person's IP and create a seperate EXE running on his computer to chat with him /her
COOL!

API Declarations

Rate Chat application

'Open a project Exe. Put a winsock, and two textbox control ,named text2 and 'text3. Paste this code in it.
Private Sub Form_Load()
With Winsock1
.RemoteHost = "your machine IP" 'put your or someone else's IP here
.RemotePort = 1001
.Bind 1002
End With
chat1.Show
End Sub
Private Sub Text3_Change()
Winsock1.SendData Text3.Text
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
Winsock1.GetData strData
Text2.Text = strData
End Sub
'********************************************************************
'paste code below into another form having 2 text boxes and winsock 
'control in the SAME project
'********************************************************************
Private Sub Form_Load()
With Winsock1
.RemoteHost = "your machine IP" 'put your or someone else's IP here
.RemotePort = 1002
.Bind 1001
End With
End Sub
Private Sub Text3_Change()
Winsock1.SendData Text3.Text
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
Winsock1.GetData strData
Text2.Text = strData
End Sub


Download this snippet    Add to My Saved Code

Chat application Comments

No comments have been posted about Chat application. Why not be the first to post a comment about Chat application.

Post your comment

Subject:
Message:
0/1000 characters