home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / internet / inter / chat.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-03-08  |  1.2 KB  |  44 lines

  1. VERSION 2.00
  2. Begin MDIForm frmChat 
  3.    Caption         =   "SuperChat World-Wide Chat"
  4.    ClientHeight    =   10095
  5.    ClientLeft      =   165
  6.    ClientTop       =   585
  7.    ClientWidth     =   14805
  8.    Height          =   10500
  9.    Icon            =   CHAT.FRX:0000
  10.    Left            =   105
  11.    LinkTopic       =   "MDIForm1"
  12.    Top             =   240
  13.    Width           =   14925
  14. DefInt A-Z
  15. Sub MDIForm_Load ()
  16. '-- This is where it all begins.
  17.     '-- The user can specify another port to listen on
  18.     '   on the command line. The default is 2776 (picked
  19.     '   it out of a hat
  20.     If Len(Command$) Then
  21.         ListenPort = Val(Command$)
  22.     Else
  23.         ListenPort = 2766
  24.     End If
  25.     '-- Set the local port to listen on
  26.     frmLocal.dssLocal.LocalPort = ListenPort
  27.     '-- Try and listen
  28.     On Error Resume Next
  29.     frmLocal.dssLocal.Action = DSSOCK_LISTEN
  30.     '-- Show the form
  31.     frmLocal.Show
  32. End Sub
  33. Sub MDIForm_Unload (Cancel As Integer)
  34.     '-- Before unloading, make sure to
  35.     '   unload all of the other forms
  36.     For i = 0 To Forms.Count - 1
  37.         If Not Forms(i) Is Me Then
  38.             Unload Forms(i)
  39.         End If
  40.     Next
  41.     '-- bye
  42.     End
  43. End Sub
  44.