VERSION 5.00 Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX" Begin VB.Form Form1 BorderStyle = 1 'Fixed Single Caption = "Client" ClientHeight = 4545 ClientLeft = 45 ClientTop = 330 ClientWidth = 5010 LinkTopic = "Form1" MaxButton = 0 'False ScaleHeight = 4545 ScaleWidth = 5010 StartUpPosition = 3 'Windows Default Begin VB.TextBox txtmsg Height = 375 Left = 120 TabIndex = 5 Top = 4080 Width = 3615 End Begin VB.CommandButton Command2 Caption = "&Send" Height = 375 Left = 3840 TabIndex = 4 Top = 4080 Width = 1095 End Begin VB.TextBox txtchat Height = 3375 Left = 120 MultiLine = -1 'True ScrollBars = 2 'Vertical TabIndex = 3 Top = 600 Width = 4815 End Begin VB.CommandButton Command1 Caption = "&Connect" Height = 375 Left = 3840 TabIndex = 2 Top = 120 Width = 1095 End Begin VB.TextBox txtport BackColor = &H00E0E0E0& Height = 375 Left = 2880 TabIndex = 1 Text = "7777" Top = 120 Width = 855 End Begin VB.TextBox txtip BackColor = &H00E0E0E0& Height = 375 Left = 120 TabIndex = 0 Top = 120 Width = 2655 End Begin MSWinsockLib.Winsock Winsock Left = 0 Top = 0 _ExtentX = 741 _ExtentY = 741 _Version = 393216 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Command1_Click() Winsock.Connect txtip.Text, txtport.Text End Sub Private Sub Command2_Click() Winsock.SendData "Client: " & txtmsg.Text txtchat.Text = txtchat.Text & "Client: " & txtmsg.Text & vbNewLine txtmsg.Text = "" End Sub Private Sub Form_Load() txtip.Text = Winsock.LocalIP End Sub Private Sub Winsock_DataArrival(ByVal bytesTotal As Long) Winsock.GetData dataArrived, vbString txtchat.Text = txtchat.Text & dataArrived & vbNewLine End Sub