Chat application
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!
AI
AI 요약: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
소스 코드
'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 Upload
원본 댓글 (3)
Wayback Machine에서 복구됨