VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form frmChat 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Chat - Shahid Thaika"
   ClientHeight    =   4650
   ClientLeft      =   4410
   ClientTop       =   1065
   ClientWidth     =   3840
   Icon            =   "FRMCHAT.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4650
   ScaleWidth      =   3840
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin MSWinsockLib.Winsock sock 
      Left            =   3360
      Top             =   2160
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin VB.TextBox txtSend 
      Height          =   1965
      Left            =   120
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      Top             =   2520
      Width           =   3615
   End
   Begin VB.TextBox txtChatWin 
      Height          =   2055
      Left            =   120
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   0
      Text            =   "FRMCHAT.frx":1AFA
      Top             =   120
      Width           =   3615
   End
   Begin VB.Label Label1 
      Caption         =   "You type here:"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   2280
      Width           =   1815
   End
End
Attribute VB_Name = "frmChat"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim RemoteHost As String
Dim RemotePort As Integer
Dim myName As String



Private Sub Form_Load()
    
    myName = "Unax"
    
sock.LocalPort = 80
sock.Listen
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
sock.Close
Unload sock
End
End Sub


Private Sub Sock_ConnectionRequest(ByVal requestID As Long)
sock.Close
sock.Accept requestID
txtChatWin = txtChatWin & "connection accepted!  Begin Chat Session" & vbCrLf
End Sub

Private Sub Sock_DataArrival(ByVal bytesTotal As Long)
Dim strIncoming As String
sock.GetData strIncoming

txtChatWin = txtChatWin & strIncoming
End Sub

Private Sub txtSend_KeyPress(KeyAscii As Integer)
    On Error Resume Next
    sock.SendData Chr(KeyAscii)

    
End Sub
