www.pudn.com > AVPhone.zip > Form8.frm


VERSION 5.00 
Begin VB.Form Form8  
   BorderStyle     =   3  'Fixed Dialog 
   Caption         =   "Chat" 
   ClientHeight    =   2844 
   ClientLeft      =   7200 
   ClientTop       =   4572 
   ClientWidth     =   4908 
   Icon            =   "Form8.frx":0000 
   LinkTopic       =   "Form8" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   2844 
   ScaleWidth      =   4908 
   ShowInTaskbar   =   0   'False 
   Begin VB.TextBox Text2  
      Height          =   345 
      Left            =   108 
      TabIndex        =   0 
      Top             =   2340 
      Width           =   4665 
   End 
   Begin VB.TextBox Text1  
      Height          =   2124 
      Left            =   108 
      Locked          =   -1  'True 
      MultiLine       =   -1  'True 
      TabIndex        =   1 
      Top             =   72 
      Width           =   4656 
   End 
End 
Attribute VB_Name = "Form8" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
 
'add msg to list 
Friend Sub AddMessage(Msg As String) 
    AddTextStreamToCtrl Text1, Msg & vbCrLf & vbCrLf 
End Sub 
 
 
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) 
    If UnloadMode = vbFormControlMenu Then 
        Cancel = True 
        On Error Resume Next 
        Hide 
    End If 
End Sub 
 
 
Private Sub Text2_KeyPress(KeyAscii As Integer) 
    On Error GoTo ErrorHandle 
    If KeyAscii = vbKeyReturn Then 
        KeyAscii = 0 
         
        Dim s As String 
        s = Text2.Text 
         
        If Len(s) > 0 Then 
         
            'send it to remote 
            Form1.WriteMessage s 
             
             
            Text2.Text = vbNullString 
             
            AddMessage "Local:  " & s 
        End If 
    End If 
    Exit Sub 
     
ErrorHandle: 
    ShowErr 
End Sub