home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD83227292000.psc / Chat.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  2000-07-29  |  56.8 KB  |  1,596 lines

  1. VERSION 5.00
  2. Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
  3. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
  4. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  5. Begin VB.Form frmChat 
  6.    BackColor       =   &H00FF8080&
  7.    BorderStyle     =   1  'Fixed Single
  8.    Caption         =   "Cool Chat"
  9.    ClientHeight    =   6765
  10.    ClientLeft      =   45
  11.    ClientTop       =   645
  12.    ClientWidth     =   7230
  13.    FillColor       =   &H00008080&
  14.    HelpContextID   =   10
  15.    Icon            =   "Chat.frx":0000
  16.    LinkTopic       =   "Form1"
  17.    MaxButton       =   0   'False
  18.    ScaleHeight     =   6765
  19.    ScaleWidth      =   7230
  20.    StartUpPosition =   2  'CenterScreen
  21.    Begin VB.Frame FrameCheckEmail 
  22.       BackColor       =   &H00FF8080&
  23.       Caption         =   "Check Email"
  24.       BeginProperty Font 
  25.          Name            =   "MS Sans Serif"
  26.          Size            =   8.25
  27.          Charset         =   0
  28.          Weight          =   700
  29.          Underline       =   0   'False
  30.          Italic          =   0   'False
  31.          Strikethrough   =   0   'False
  32.       EndProperty
  33.       ForeColor       =   &H0000FFFF&
  34.       Height          =   2415
  35.       Left            =   120
  36.       TabIndex        =   44
  37.       Top             =   3840
  38.       Visible         =   0   'False
  39.       Width           =   6975
  40.       Begin VB.CommandButton cmdCheckEmail 
  41.          Caption         =   "Check Mail"
  42.          Height          =   315
  43.          Left            =   5640
  44.          TabIndex        =   53
  45.          Top             =   2040
  46.          Width           =   1215
  47.       End
  48.       Begin VB.TextBox txtPassword 
  49.          Height          =   285
  50.          IMEMode         =   3  'DISABLE
  51.          Left            =   3840
  52.          PasswordChar    =   "*"
  53.          TabIndex        =   2
  54.          Text            =   "Jasean94"
  55.          ToolTipText     =   "Pop3 Password (Usually same as ISP password)"
  56.          Top             =   1920
  57.          Width           =   1335
  58.       End
  59.       Begin VB.CheckBox chkLogStatus 
  60.          Alignment       =   1  'Right Justify
  61.          BackColor       =   &H00FF8080&
  62.          BeginProperty Font 
  63.             Name            =   "MS Sans Serif"
  64.             Size            =   8.25
  65.             Charset         =   0
  66.             Weight          =   700
  67.             Underline       =   0   'False
  68.             Italic          =   0   'False
  69.             Strikethrough   =   0   'False
  70.          EndProperty
  71.          Height          =   495
  72.          Left            =   6000
  73.          TabIndex        =   3
  74.          ToolTipText     =   "Check this if you want to see the responses from the POP3 server"
  75.          Top             =   600
  76.          Width           =   255
  77.       End
  78.       Begin VB.TextBox txtServer 
  79.          Height          =   285
  80.          Left            =   240
  81.          TabIndex        =   0
  82.          Text            =   "216.169.120.181"
  83.          ToolTipText     =   "Usually: mail.yourisp.com , pop.yourisp.com , pop3.yourisp.com (Not for AOL users)"
  84.          Top             =   1920
  85.          Width           =   1695
  86.       End
  87.       Begin VB.TextBox txtUser 
  88.          Height          =   285
  89.          Left            =   2160
  90.          TabIndex        =   1
  91.          Text            =   "ebonyhq"
  92.          ToolTipText     =   "Pop3 Username (Usually same as ISP username)"
  93.          Top             =   1920
  94.          Width           =   1455
  95.       End
  96.       Begin VB.TextBox txtPOP3Port 
  97.          Height          =   285
  98.          Left            =   5880
  99.          TabIndex        =   5
  100.          Text            =   "110"
  101.          ToolTipText     =   "POP3 Port - Default is 110"
  102.          Top             =   1440
  103.          Width           =   495
  104.       End
  105.       Begin VB.Frame FrameCheckEmailStatus 
  106.          BackColor       =   &H00FF8080&
  107.          Caption         =   "Port Connection Status:"
  108.          BeginProperty Font 
  109.             Name            =   "MS Sans Serif"
  110.             Size            =   8.25
  111.             Charset         =   0
  112.             Weight          =   700
  113.             Underline       =   0   'False
  114.             Italic          =   0   'False
  115.             Strikethrough   =   0   'False
  116.          EndProperty
  117.          Height          =   1215
  118.          Left            =   120
  119.          TabIndex        =   45
  120.          Top             =   360
  121.          Width           =   5295
  122.          Begin ComctlLib.ProgressBar ProgressBar2 
  123.             Height          =   135
  124.             Left            =   120
  125.             TabIndex        =   47
  126.             ToolTipText     =   "Status Progress Bar"
  127.             Top             =   960
  128.             Width           =   5055
  129.             _ExtentX        =   8916
  130.             _ExtentY        =   238
  131.             _Version        =   327682
  132.             Appearance      =   1
  133.          End
  134.          Begin VB.ListBox lstStatus 
  135.             Height          =   645
  136.             Left            =   120
  137.             TabIndex        =   46
  138.             TabStop         =   0   'False
  139.             ToolTipText     =   "Port Status Messages"
  140.             Top             =   240
  141.             Width           =   5055
  142.          End
  143.       End
  144.       Begin VB.Label lblCaption 
  145.          Alignment       =   2  'Center
  146.          BackColor       =   &H00FF8080&
  147.          Caption         =   "Show Port Status"
  148.          BeginProperty Font 
  149.             Name            =   "MS Sans Serif"
  150.             Size            =   8.25
  151.             Charset         =   0
  152.             Weight          =   700
  153.             Underline       =   0   'False
  154.             Italic          =   0   'False
  155.             Strikethrough   =   0   'False
  156.          EndProperty
  157.          Height          =   375
  158.          Index           =   4
  159.          Left            =   5640
  160.          TabIndex        =   52
  161.          Top             =   240
  162.          Width           =   975
  163.       End
  164.       Begin VB.Label lblCaption 
  165.          Alignment       =   2  'Center
  166.          BackColor       =   &H00FF8080&
  167.          Caption         =   "Port:"
  168.          BeginProperty Font 
  169.             Name            =   "MS Sans Serif"
  170.             Size            =   8.25
  171.             Charset         =   0
  172.             Weight          =   700
  173.             Underline       =   0   'False
  174.             Italic          =   0   'False
  175.             Strikethrough   =   0   'False
  176.          EndProperty
  177.          Height          =   255
  178.          Index           =   0
  179.          Left            =   5760
  180.          TabIndex        =   51
  181.          Top             =   1200
  182.          Width           =   615
  183.       End
  184.       Begin VB.Label lblCaption 
  185.          BackColor       =   &H00FF8080&
  186.          Caption         =   "POP3 Server:"
  187.          BeginProperty Font 
  188.             Name            =   "MS Sans Serif"
  189.             Size            =   8.25
  190.             Charset         =   0
  191.             Weight          =   700
  192.             Underline       =   0   'False
  193.             Italic          =   0   'False
  194.             Strikethrough   =   0   'False
  195.          EndProperty
  196.          Height          =   255
  197.          Index           =   1
  198.          Left            =   240
  199.          TabIndex        =   50
  200.          Top             =   1680
  201.          Width           =   1215
  202.       End
  203.       Begin VB.Label lblCaption 
  204.          BackColor       =   &H00FF8080&
  205.          Caption         =   "Username:"
  206.          BeginProperty Font 
  207.             Name            =   "MS Sans Serif"
  208.             Size            =   8.25
  209.             Charset         =   0
  210.             Weight          =   700
  211.             Underline       =   0   'False
  212.             Italic          =   0   'False
  213.             Strikethrough   =   0   'False
  214.          EndProperty
  215.          Height          =   255
  216.          Index           =   2
  217.          Left            =   2160
  218.          TabIndex        =   49
  219.          Top             =   1680
  220.          Width           =   975
  221.       End
  222.       Begin VB.Label lblCaption 
  223.          BackColor       =   &H00FF8080&
  224.          Caption         =   "Password:"
  225.          BeginProperty Font 
  226.             Name            =   "MS Sans Serif"
  227.             Size            =   8.25
  228.             Charset         =   0
  229.             Weight          =   700
  230.             Underline       =   0   'False
  231.             Italic          =   0   'False
  232.             Strikethrough   =   0   'False
  233.          EndProperty
  234.          Height          =   255
  235.          Index           =   3
  236.          Left            =   4200
  237.          TabIndex        =   48
  238.          Top             =   1680
  239.          Width           =   975
  240.       End
  241.    End
  242.    Begin VB.Frame FrameUtility 
  243.       BackColor       =   &H00FF8080&
  244.       Caption         =   "Utilities"
  245.       BeginProperty Font 
  246.          Name            =   "MS Sans Serif"
  247.          Size            =   8.25
  248.          Charset         =   0
  249.          Weight          =   700
  250.          Underline       =   0   'False
  251.          Italic          =   0   'False
  252.          Strikethrough   =   0   'False
  253.       EndProperty
  254.       ForeColor       =   &H0000FFFF&
  255.       Height          =   735
  256.       Left            =   120
  257.       TabIndex        =   34
  258.       Top             =   3000
  259.       Width           =   6975
  260.       Begin MSComDlg.CommonDialog CommonDialog1 
  261.          Left            =   5040
  262.          Top             =   240
  263.          _ExtentX        =   847
  264.          _ExtentY        =   847
  265.          _Version        =   393216
  266.       End
  267.       Begin VB.Timer tmrClock 
  268.          Enabled         =   0   'False
  269.          Interval        =   1000
  270.          Left            =   1560
  271.          Top             =   120
  272.       End
  273.       Begin VB.Timer tmrFlash 
  274.          Enabled         =   0   'False
  275.          Interval        =   500
  276.          Left            =   3000
  277.          Top             =   120
  278.       End
  279.       Begin VB.OptionButton optUtility 
  280.          BackColor       =   &H00FF8080&
  281.          Caption         =   "Connect Options"
  282.          BeginProperty Font 
  283.             Name            =   "MS Sans Serif"
  284.             Size            =   8.25
  285.             Charset         =   0
  286.             Weight          =   700
  287.             Underline       =   0   'False
  288.             Italic          =   0   'False
  289.             Strikethrough   =   0   'False
  290.          EndProperty
  291.          Height          =   255
  292.          Index           =   0
  293.          Left            =   120
  294.          TabIndex        =   37
  295.          Top             =   360
  296.          Value           =   -1  'True
  297.          Width           =   1815
  298.       End
  299.       Begin VB.OptionButton optUtility 
  300.          BackColor       =   &H00FF8080&
  301.          Caption         =   "Check Email"
  302.          BeginProperty Font 
  303.             Name            =   "MS Sans Serif"
  304.             Size            =   8.25
  305.             Charset         =   0
  306.             Weight          =   700
  307.             Underline       =   0   'False
  308.             Italic          =   0   'False
  309.             Strikethrough   =   0   'False
  310.          EndProperty
  311.          Height          =   255
  312.          Index           =   2
  313.          Left            =   3600
  314.          TabIndex        =   36
  315.          Top             =   360
  316.          Width           =   1455
  317.       End
  318.       Begin VB.OptionButton optUtility 
  319.          BackColor       =   &H00FF8080&
  320.          Caption         =   "Send Email"
  321.          BeginProperty Font 
  322.             Name            =   "MS Sans Serif"
  323.             Size            =   8.25
  324.             Charset         =   0
  325.             Weight          =   700
  326.             Underline       =   0   'False
  327.             Italic          =   0   'False
  328.             Strikethrough   =   0   'False
  329.          EndProperty
  330.          Height          =   255
  331.          Index           =   1
  332.          Left            =   2040
  333.          TabIndex        =   35
  334.          Top             =   360
  335.          Width           =   1335
  336.       End
  337.       Begin MSWinsockLib.Winsock Winsock3 
  338.          Left            =   5400
  339.          Top             =   240
  340.          _ExtentX        =   741
  341.          _ExtentY        =   741
  342.          _Version        =   393216
  343.       End
  344.       Begin MSWinsockLib.Winsock Winsock1 
  345.          Left            =   5880
  346.          Top             =   240
  347.          _ExtentX        =   741
  348.          _ExtentY        =   741
  349.          _Version        =   393216
  350.       End
  351.       Begin MSWinsockLib.Winsock Winsock2 
  352.          Left            =   6480
  353.          Top             =   240
  354.          _ExtentX        =   741
  355.          _ExtentY        =   741
  356.          _Version        =   393216
  357.       End
  358.       Begin ComctlLib.ImageList ImageList1 
  359.          Left            =   6240
  360.          Top             =   0
  361.          _ExtentX        =   1005
  362.          _ExtentY        =   1005
  363.          BackColor       =   -2147483643
  364.          ImageWidth      =   74
  365.          ImageHeight     =   90
  366.          MaskColor       =   12632256
  367.          _Version        =   327682
  368.          BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
  369.             NumListImages   =   2
  370.             BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  371.                Picture         =   "Chat.frx":27A2
  372.                Key             =   ""
  373.             EndProperty
  374.             BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  375.                Picture         =   "Chat.frx":76B4
  376.                Key             =   ""
  377.             EndProperty
  378.          EndProperty
  379.       End
  380.    End
  381.    Begin VB.Frame FrameSendText 
  382.       BackColor       =   &H00FF8080&
  383.       Caption         =   "Send Text"
  384.       BeginProperty Font 
  385.          Name            =   "MS Sans Serif"
  386.          Size            =   8.25
  387.          Charset         =   0
  388.          Weight          =   700
  389.          Underline       =   0   'False
  390.          Italic          =   0   'False
  391.          Strikethrough   =   0   'False
  392.       EndProperty
  393.       ForeColor       =   &H0000FFFF&
  394.       Height          =   615
  395.       Left            =   120
  396.       TabIndex        =   31
  397.       Top             =   2280
  398.       Width           =   6975
  399.       Begin VB.Frame FrameCounter 
  400.          BackColor       =   &H00FF8080&
  401.          BorderStyle     =   0  'None
  402.          Caption         =   "Online For:"
  403.          BeginProperty Font 
  404.             Name            =   "MS Sans Serif"
  405.             Size            =   8.25
  406.             Charset         =   0
  407.             Weight          =   700
  408.             Underline       =   0   'False
  409.             Italic          =   0   'False
  410.             Strikethrough   =   0   'False
  411.          EndProperty
  412.          ForeColor       =   &H0000FFFF&
  413.          Height          =   375
  414.          Left            =   4320
  415.          TabIndex        =   38
  416.          Top             =   120
  417.          Width           =   2535
  418.          Begin VB.Label lblMinutes 
  419.             Alignment       =   2  'Center
  420.             BackColor       =   &H00FFC0C0&
  421.             BeginProperty Font 
  422.                Name            =   "MS Sans Serif"
  423.                Size            =   8.25
  424.                Charset         =   0
  425.                Weight          =   700
  426.                Underline       =   0   'False
  427.                Italic          =   0   'False
  428.                Strikethrough   =   0   'False
  429.             EndProperty
  430.             ForeColor       =   &H000000C0&
  431.             Height          =   255
  432.             Left            =   0
  433.             TabIndex        =   42
  434.             Top             =   120
  435.             Width           =   375
  436.          End
  437.          Begin VB.Label Label2 
  438.             BackColor       =   &H00FFC0C0&
  439.             Caption         =   "Minute(s)"
  440.             BeginProperty Font 
  441.                Name            =   "MS Sans Serif"
  442.                Size            =   8.25
  443.                Charset         =   0
  444.                Weight          =   700
  445.                Underline       =   0   'False
  446.                Italic          =   0   'False
  447.                Strikethrough   =   0   'False
  448.             EndProperty
  449.             Height          =   255
  450.             Left            =   360
  451.             TabIndex        =   41
  452.             Top             =   120
  453.             Width           =   855
  454.          End
  455.          Begin VB.Label lblSeconds 
  456.             Alignment       =   2  'Center
  457.             BackColor       =   &H00FFC0C0&
  458.             BeginProperty Font 
  459.                Name            =   "MS Sans Serif"
  460.                Size            =   8.25
  461.                Charset         =   0
  462.                Weight          =   700
  463.                Underline       =   0   'False
  464.                Italic          =   0   'False
  465.                Strikethrough   =   0   'False
  466.             EndProperty
  467.             ForeColor       =   &H000000C0&
  468.             Height          =   255
  469.             Left            =   1200
  470.             TabIndex        =   40
  471.             Top             =   120
  472.             Width           =   375
  473.          End
  474.          Begin VB.Label Label3 
  475.             BackColor       =   &H00FFC0C0&
  476.             Caption         =   "Seconds"
  477.             BeginProperty Font 
  478.                Name            =   "MS Sans Serif"
  479.                Size            =   8.25
  480.                Charset         =   0
  481.                Weight          =   700
  482.                Underline       =   0   'False
  483.                Italic          =   0   'False
  484.                Strikethrough   =   0   'False
  485.             EndProperty
  486.             Height          =   255
  487.             Left            =   1560
  488.             TabIndex        =   39
  489.             Top             =   120
  490.             Width           =   855
  491.          End
  492.       End
  493.       Begin VB.CommandButton cmdSendText 
  494.          Caption         =   "Send Text"
  495.          Height          =   255
  496.          Left            =   3000
  497.          TabIndex        =   33
  498.          ToolTipText     =   "This button send the text to the left to the other party"
  499.          Top             =   240
  500.          Width           =   1095
  501.       End
  502.       Begin VB.TextBox txtSendText 
  503.          Height          =   285
  504.          Left            =   120
  505.          TabIndex        =   32
  506.          ToolTipText     =   "Text to send to your friend"
  507.          Top             =   240
  508.          Width           =   2775
  509.       End
  510.    End
  511.    Begin VB.Frame FrameStatus 
  512.       BackColor       =   &H00FF8080&
  513.       Caption         =   "Status:"
  514.       BeginProperty Font 
  515.          Name            =   "MS Sans Serif"
  516.          Size            =   8.25
  517.          Charset         =   0
  518.          Weight          =   700
  519.          Underline       =   0   'False
  520.          Italic          =   0   'False
  521.          Strikethrough   =   0   'False
  522.       EndProperty
  523.       ForeColor       =   &H0000FFFF&
  524.       Height          =   2175
  525.       Left            =   5760
  526.       TabIndex        =   28
  527.       Top             =   0
  528.       Width           =   1335
  529.       Begin VB.CommandButton cmdConnect 
  530.          Caption         =   "Connect"
  531.          Height          =   375
  532.          Left            =   120
  533.          TabIndex        =   30
  534.          ToolTipText     =   "This button controls Connecting, Disconnecting and Listening"
  535.          Top             =   1680
  536.          Width           =   1095
  537.       End
  538.       Begin VB.PictureBox imgConnecting 
  539.          Appearance      =   0  'Flat
  540.          AutoSize        =   -1  'True
  541.          BackColor       =   &H00FF8080&
  542.          BorderStyle     =   0  'None
  543.          ForeColor       =   &H80000008&
  544.          Height          =   1350
  545.          Left            =   120
  546.          Picture         =   "Chat.frx":C5C6
  547.          ScaleHeight     =   1350
  548.          ScaleWidth      =   1110
  549.          TabIndex        =   29
  550.          Top             =   240
  551.          Visible         =   0   'False
  552.          Width           =   1110
  553.       End
  554.       Begin VB.Image imgOnline 
  555.          Height          =   1350
  556.          Left            =   120
  557.          Picture         =   "Chat.frx":D5BF
  558.          Top             =   240
  559.          Visible         =   0   'False
  560.          Width           =   1110
  561.       End
  562.       Begin VB.Image imgOffline 
  563.          Height          =   1350
  564.          Left            =   120
  565.          Picture         =   "Chat.frx":E5C9
  566.          Top             =   240
  567.          Width           =   1110
  568.       End
  569.    End
  570.    Begin ComctlLib.StatusBar StatusBar1 
  571.       Align           =   2  'Align Bottom
  572.       Height          =   375
  573.       Left            =   0
  574.       TabIndex        =   19
  575.       Top             =   6390
  576.       Width           =   7230
  577.       _ExtentX        =   12753
  578.       _ExtentY        =   661
  579.       SimpleText      =   ""
  580.       _Version        =   327682
  581.       BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
  582.          NumPanels       =   3
  583.          BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
  584.             Alignment       =   1
  585.             Object.Width           =   2469
  586.             MinWidth        =   2469
  587.             Object.Tag             =   ""
  588.          EndProperty
  589.          BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
  590.             Alignment       =   1
  591.             Object.Width           =   7937
  592.             MinWidth        =   7937
  593.             Object.Tag             =   ""
  594.          EndProperty
  595.          BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
  596.             Style           =   5
  597.             Alignment       =   1
  598.             Object.Width           =   2293
  599.             MinWidth        =   2293
  600.             TextSave        =   "2:17 AM"
  601.             Object.Tag             =   ""
  602.          EndProperty
  603.       EndProperty
  604.    End
  605.    Begin VB.TextBox txtIncomingData 
  606.       Height          =   2175
  607.       Left            =   120
  608.       MultiLine       =   -1  'True
  609.       ScrollBars      =   2  'Vertical
  610.       TabIndex        =   4
  611.       Top             =   0
  612.       Width           =   5655
  613.    End
  614.    Begin VB.Frame FrameSendEmail 
  615.       BackColor       =   &H00FF8080&
  616.       Caption         =   "Send Email"
  617.       BeginProperty Font 
  618.          Name            =   "MS Sans Serif"
  619.          Size            =   8.25
  620.          Charset         =   0
  621.          Weight          =   700
  622.          Underline       =   0   'False
  623.          Italic          =   0   'False
  624.          Strikethrough   =   0   'False
  625.       EndProperty
  626.       ForeColor       =   &H0000FFFF&
  627.       Height          =   2175
  628.       Left            =   120
  629.       TabIndex        =   20
  630.       Top             =   3840
  631.       Visible         =   0   'False
  632.       Width           =   6975
  633.       Begin VB.Frame FrameSendEmailStatus 
  634.          BackColor       =   &H00FF8080&
  635.          Caption         =   "Status"
  636.          BeginProperty Font 
  637.             Name            =   "MS Sans Serif"
  638.             Size            =   8.25
  639.             Charset         =   0
  640.             Weight          =   700
  641.             Underline       =   0   'False
  642.             Italic          =   0   'False
  643.             Strikethrough   =   0   'False
  644.          EndProperty
  645.          Height          =   1695
  646.          Left            =   5400
  647.          TabIndex        =   25
  648.          Top             =   240
  649.          Width           =   1455
  650.          Begin VB.CommandButton cmdSendMail 
  651.             Caption         =   "Send"
  652.             Height          =   255
  653.             Left            =   120
  654.             TabIndex        =   54
  655.             Top             =   1200
  656.             Width           =   1215
  657.          End
  658.          Begin ComctlLib.ProgressBar ProgressBar1 
  659.             Height          =   135
  660.             Left            =   120
  661.             TabIndex        =   26
  662.             Top             =   720
  663.             Width           =   1215
  664.             _ExtentX        =   2143
  665.             _ExtentY        =   238
  666.             _Version        =   327682
  667.             Appearance      =   1
  668.          End
  669.          Begin VB.Label StatusTxt 
  670.             BackColor       =   &H00FF8080&
  671.             Height          =   375
  672.             Left            =   120
  673.             TabIndex        =   27
  674.             ToolTipText     =   "Status Messages"
  675.             Top             =   240
  676.             Width           =   1215
  677.          End
  678.       End
  679.       Begin VB.TextBox txtEmailBodyOfMessage 
  680.          Height          =   1215
  681.          Left            =   2040
  682.          MultiLine       =   -1  'True
  683.          ScrollBars      =   2  'Vertical
  684.          TabIndex        =   10
  685.          ToolTipText     =   "Put your text here"
  686.          Top             =   240
  687.          Width           =   3255
  688.       End
  689.       Begin VB.TextBox txtToEmailAddress 
  690.          Height          =   285
  691.          Left            =   120
  692.          TabIndex        =   7
  693.          Top             =   1080
  694.          Width           =   1815
  695.       End
  696.       Begin VB.TextBox txtFromEmailAddress 
  697.          Height          =   285
  698.          Left            =   120
  699.          TabIndex        =   6
  700.          ToolTipText     =   "youremail@yourisp.com"
  701.          Top             =   480
  702.          Width           =   1815
  703.       End
  704.       Begin VB.TextBox txtEmailServer 
  705.          Height          =   285
  706.          Left            =   120
  707.          TabIndex        =   8
  708.          Text            =   "12.9.25.36"
  709.          ToolTipText     =   "mail.yourisp.com or smtp.yourisp.com"
  710.          Top             =   1680
  711.          Width           =   1815
  712.       End
  713.       Begin VB.TextBox txtEmailSubject 
  714.          Height          =   285
  715.          Left            =   2040
  716.          TabIndex        =   9
  717.          ToolTipText     =   "Email Subject"
  718.          Top             =   1680
  719.          Width           =   3255
  720.       End
  721.       Begin VB.Label Label7 
  722.          BackColor       =   &H00FF8080&
  723.          Caption         =   "Send To:"
  724.          BeginProperty Font 
  725.             Name            =   "MS Sans Serif"
  726.             Size            =   9.75
  727.             Charset         =   0
  728.             Weight          =   700
  729.             Underline       =   0   'False
  730.             Italic          =   0   'False
  731.             Strikethrough   =   0   'False
  732.          EndProperty
  733.          Height          =   255
  734.          Left            =   120
  735.          TabIndex        =   24
  736.          Top             =   840
  737.          Width           =   975
  738.       End
  739.       Begin VB.Label Label1 
  740.          BackColor       =   &H00FF8080&
  741.          Caption         =   "Your Email Address:"
  742.          BeginProperty Font 
  743.             Name            =   "MS Sans Serif"
  744.             Size            =   9.75
  745.             Charset         =   0
  746.             Weight          =   700
  747.             Underline       =   0   'False
  748.             Italic          =   0   'False
  749.             Strikethrough   =   0   'False
  750.          EndProperty
  751.          Height          =   255
  752.          Left            =   120
  753.          TabIndex        =   23
  754.          Top             =   240
  755.          Width           =   1935
  756.       End
  757.       Begin VB.Label Label5 
  758.          BackColor       =   &H00FF8080&
  759.          Caption         =   "SMTP Address:"
  760.          BeginProperty Font 
  761.             Name            =   "MS Sans Serif"
  762.             Size            =   9.75
  763.             Charset         =   0
  764.             Weight          =   700
  765.             Underline       =   0   'False
  766.             Italic          =   0   'False
  767.             Strikethrough   =   0   'False
  768.          EndProperty
  769.          Height          =   255
  770.          Left            =   120
  771.          TabIndex        =   22
  772.          Top             =   1440
  773.          Width           =   1935
  774.       End
  775.       Begin VB.Label Label6 
  776.          BackColor       =   &H00FF8080&
  777.          Caption         =   "Subject:"
  778.          BeginProperty Font 
  779.             Name            =   "MS Sans Serif"
  780.             Size            =   9.75
  781.             Charset         =   0
  782.             Weight          =   700
  783.             Underline       =   0   'False
  784.             Italic          =   0   'False
  785.             Strikethrough   =   0   'False
  786.          EndProperty
  787.          Height          =   255
  788.          Left            =   2040
  789.          TabIndex        =   21
  790.          Top             =   1440
  791.          Width           =   855
  792.       End
  793.    End
  794.    Begin VB.Frame FrameConnectOptions 
  795.       BackColor       =   &H00FF8080&
  796.       Caption         =   "Connect Options"
  797.       BeginProperty Font 
  798.          Name            =   "MS Sans Serif"
  799.          Size            =   8.25
  800.          Charset         =   0
  801.          Weight          =   700
  802.          Underline       =   0   'False
  803.          Italic          =   0   'False
  804.          Strikethrough   =   0   'False
  805.       EndProperty
  806.       ForeColor       =   &H0000FFFF&
  807.       Height          =   975
  808.       Left            =   120
  809.       TabIndex        =   16
  810.       Top             =   3840
  811.       Width           =   6975
  812.       Begin VB.TextBox txtNick 
  813.          Height          =   285
  814.          Left            =   5040
  815.          TabIndex        =   15
  816.          Text            =   "Nick Name"
  817.          ToolTipText     =   "You can change the Nickname even during a chat session"
  818.          Top             =   480
  819.          Width           =   1215
  820.       End
  821.       Begin VB.TextBox txtPort 
  822.          Height          =   285
  823.          Left            =   4200
  824.          TabIndex        =   14
  825.          Text            =   "1005"
  826.          ToolTipText     =   "The Host AND Guest MUST use the same port number"
  827.          Top             =   480
  828.          Width           =   615
  829.       End
  830.       Begin VB.TextBox txtIP 
  831.          Height          =   285
  832.          Left            =   2520
  833.          TabIndex        =   13
  834.          Text            =   "localhost"
  835.          ToolTipText     =   "If you're connecting to yourself, then leave as Localhost... Otherwise enter the IP# of the Host"
  836.          Top             =   480
  837.          Width           =   1415
  838.       End
  839.       Begin VB.OptionButton optHostGuest 
  840.          BackColor       =   &H00FF8080&
  841.          Caption         =   "GUEST"
  842.          BeginProperty Font 
  843.             Name            =   "MS Sans Serif"
  844.             Size            =   8.25
  845.             Charset         =   0
  846.             Weight          =   700
  847.             Underline       =   0   'False
  848.             Italic          =   0   'False
  849.             Strikethrough   =   0   'False
  850.          EndProperty
  851.          ForeColor       =   &H000000FF&
  852.          Height          =   195
  853.          Index           =   1
  854.          Left            =   1200
  855.          TabIndex        =   12
  856.          ToolTipText     =   "You will connect to a host... Get the IP# of the Host and enter below"
  857.          Top             =   480
  858.          Value           =   -1  'True
  859.          Width           =   1095
  860.       End
  861.       Begin VB.OptionButton optHostGuest 
  862.          BackColor       =   &H00FF8080&
  863.          Caption         =   "HOST"
  864.          BeginProperty Font 
  865.             Name            =   "MS Sans Serif"
  866.             Size            =   8.25
  867.             Charset         =   0
  868.             Weight          =   700
  869.             Underline       =   0   'False
  870.             Italic          =   0   'False
  871.             Strikethrough   =   0   'False
  872.          EndProperty
  873.          ForeColor       =   &H000000FF&
  874.          Height          =   195
  875.          Index           =   0
  876.          Left            =   120
  877.          TabIndex        =   11
  878.          ToolTipText     =   "You will receive the connection, tell your friend your IP#"
  879.          Top             =   480
  880.          Width           =   975
  881.       End
  882.       Begin VB.Label LabelNick 
  883.          Alignment       =   2  'Center
  884.          AutoSize        =   -1  'True
  885.          BackColor       =   &H00FF8080&
  886.          Caption         =   "Nick Name"
  887.          BeginProperty Font 
  888.             Name            =   "MS Sans Serif"
  889.             Size            =   8.25
  890.             Charset         =   0
  891.             Weight          =   700
  892.             Underline       =   0   'False
  893.             Italic          =   0   'False
  894.             Strikethrough   =   0   'False
  895.          EndProperty
  896.          Height          =   195
  897.          Left            =   5040
  898.          TabIndex        =   43
  899.          Top             =   240
  900.          Width           =   975
  901.       End
  902.       Begin VB.Label LabelAddress 
  903.          AutoSize        =   -1  'True
  904.          BackColor       =   &H00FF8080&
  905.          Caption         =   "Address"
  906.          BeginProperty Font 
  907.             Name            =   "MS Sans Serif"
  908.             Size            =   8.25
  909.             Charset         =   0
  910.             Weight          =   700
  911.             Underline       =   0   'False
  912.             Italic          =   0   'False
  913.             Strikethrough   =   0   'False
  914.          EndProperty
  915.          Height          =   195
  916.          Left            =   2520
  917.          TabIndex        =   18
  918.          Top             =   240
  919.          Width           =   690
  920.       End
  921.       Begin VB.Label labelPort 
  922.          Alignment       =   2  'Center
  923.          AutoSize        =   -1  'True
  924.          BackColor       =   &H00FF8080&
  925.          Caption         =   "Port"
  926.          BeginProperty Font 
  927.             Name            =   "MS Sans Serif"
  928.             Size            =   8.25
  929.             Charset         =   0
  930.             Weight          =   700
  931.             Underline       =   0   'False
  932.             Italic          =   0   'False
  933.             Strikethrough   =   0   'False
  934.          EndProperty
  935.          Height          =   195
  936.          Left            =   4200
  937.          TabIndex        =   17
  938.          Top             =   240
  939.          Width           =   375
  940.       End
  941.    End
  942.    Begin VB.Menu mnuFile 
  943.       Caption         =   "&File"
  944.       Begin VB.Menu mnuExit 
  945.          Caption         =   "E&xit"
  946.       End
  947.    End
  948.    Begin VB.Menu mnuOptions 
  949.       Caption         =   "&Colors"
  950.       Begin VB.Menu mnuColor 
  951.          Caption         =   "Background Color"
  952.       End
  953.       Begin VB.Menu mnuFrameColor 
  954.          Caption         =   "Frame Background Colors"
  955.       End
  956.       Begin VB.Menu mnuFrameCapColor 
  957.          Caption         =   "Frame Caption Color"
  958.       End
  959.    End
  960.    Begin VB.Menu mnuHelp 
  961.       Caption         =   "&Help"
  962.       Begin VB.Menu mnuHelpContents 
  963.          Caption         =   "Contents"
  964.          HelpContextID   =   10
  965.       End
  966.       Begin VB.Menu mnuAbout 
  967.          Caption         =   "&About"
  968.       End
  969.    End
  970. Attribute VB_Name = "frmChat"
  971. Attribute VB_GlobalNameSpace = False
  972. Attribute VB_Creatable = False
  973. Attribute VB_PredeclaredId = True
  974. Attribute VB_Exposed = False
  975. 'Written by Michael Sharp (aka Mike D.) mdsharp@netzero.net
  976. 'Notes:
  977. 'In case you can't figure out how I got all the images
  978. 'to change, depending on the connection status, I have 4
  979. 'different images laid on top of each other (imgConnecting,
  980. 'imgOnline, imgOffline, imgConnecting (you can move
  981. 'them around on the form layout to see))
  982. 'Chat variables
  983. Dim IP As String
  984. Dim s As Integer
  985. Dim m As Integer
  986. 'Utilities: Send Email variables
  987. Dim Response As String, Reply As Integer, DateNow As String
  988. Dim first As String, Second As String, Third As String
  989. Dim Fourth As String, Fifth As String, Sixth As String
  990. Dim Seventh As String, Eighth As String, Ninth As String
  991. Dim start As Single, Tmr As Single
  992. 'Utilities: Check Email variables
  993. Option Explicit
  994. 'Constant used to limit the number of list
  995. 'box items before removing the oldest
  996. Private Const MAX_LIST_ITEMS = 100
  997. 'Variables to store waiting message information
  998. Private mnMessageCount As Integer
  999. Private mlMessageChars As Long
  1000. 'This variable hold the most recent command
  1001. 'that was sent to the POP3 Server
  1002. Private msCommand As String
  1003. 'State of the Log Port Status Check Box
  1004. Private mbLogStatus As Boolean
  1005. 'Variable to track state of socket data reception
  1006. Private mbGotData As Boolean
  1007. 'Array for socket state descriptions
  1008. Private mvntSocketState As Variant
  1009. '################# BEGIN CHAT SUBS ######################
  1010. 'Below Subs (Offline, Online, Connecting & Listening
  1011. 'are repetitious tasks that are called from other
  1012. 'Subs. Instead of putting these 10 or so lines in each Sub
  1013. 'that they belong to, I put them up here which makes it
  1014. 'easier to figure out the heart of each sub instead of
  1015. 'being bombarded by all of these .Visible's ,  etc
  1016. 'Perhaps I could've made some modules?
  1017. Public Sub Offline()
  1018. imgOffline.Visible = True
  1019. imgOnline.Visible = False
  1020. imgConnecting.Visible = False
  1021. txtPort.Enabled = True
  1022. txtNick.Enabled = True
  1023. txtIP.Enabled = True
  1024. cmdSendText.Enabled = False
  1025. txtSendText.Enabled = False
  1026. optHostGuest(0).Enabled = True
  1027. optHostGuest(1).Enabled = True
  1028. StatusBar1.Panels(2).Text = ""
  1029. Winsock1.Close
  1030. 'Reset Online Timer
  1031. tmrClock.Enabled = False
  1032. s = 0
  1033. m = 0
  1034. FrameCounter.Visible = False
  1035. lblSeconds.Caption = ""
  1036. lblMinutes.Caption = ""
  1037. tmrFlash.Enabled = False
  1038. End Sub
  1039. Public Sub Online()
  1040. imgOnline.Visible = True
  1041. imgOffline.Visible = False
  1042. imgConnecting.Visible = False
  1043. txtIP.Enabled = False
  1044. txtPort.Enabled = False
  1045. cmdSendText.Enabled = True
  1046. txtSendText.Enabled = True
  1047. txtIncomingData.Text = ""
  1048. optHostGuest(0).Enabled = False
  1049. optHostGuest(1).Enabled = False
  1050. cmdConnect.Caption = "Disconnect"
  1051. tmrFlash.Enabled = False
  1052. End Sub
  1053. Public Sub Connecting()
  1054. tmrFlash.Enabled = True
  1055. imgConnecting.Visible = True
  1056. imgOffline.Visible = False
  1057. imgOnline.Visible = False
  1058. cmdSendText.Enabled = False
  1059. txtSendText.Enabled = False
  1060. StatusBar1.Panels(2).Text = "CONTACTING HOST..."
  1061. Winsock1.Close
  1062.            IP = txtIP.Text
  1063. If LCase$(IP) = "localhost" Then IP = Winsock1.LocalIP
  1064. Winsock1.Connect txtIP.Text, txtPort.Text
  1065. End Sub
  1066. Public Sub Listening()
  1067. imgConnecting.Visible = True
  1068. imgOffline.Visible = False
  1069. imgOnline.Visible = False
  1070. cmdSendText.Enabled = False
  1071. txtSendText.Enabled = False
  1072. Winsock1.Close
  1073. Winsock1.LocalPort = txtPort.Text 'set the port
  1074. Winsock1.Listen 'tell it to listen
  1075. StatusBar1.Panels(2).Text = "LISTENING ON PORT: " & txtPort.Text
  1076. tmrFlash.Enabled = True
  1077. End Sub
  1078. Private Sub cmdConnect_Click()
  1079.     If cmdConnect.Caption = "Connect" Or cmdConnect.Caption = "Listen" Then
  1080. 'If the button is showing Connect or Listen, then we are
  1081. 'currently offline, so do this:
  1082. 'Now do the Online sub
  1083.     Call Online
  1084.     Else
  1085. 'If the button is NOT showing Connect or Listen, then we
  1086. 'must be Offline, so call the Offline sub
  1087.     Call Offline
  1088.        
  1089.      If optHostGuest(0).Value = True Then
  1090. cmdConnect.Caption = "Listen"
  1091. 'If the Host button is checked, then we dont want
  1092. 'to do the Online sub, which is for Guest Mode, we
  1093. 'want to call the Listening Sub:
  1094.    Call Listening
  1095.        Else
  1096. 'Else we are already Listening in Host mode, so Go Offline
  1097. cmdConnect.Caption = "Connect"
  1098.        End If
  1099. Call Offline
  1100. Exit Sub
  1101.     End If
  1102.     Select Case optHostGuest(0).Value
  1103.         Case True:  'Host
  1104.            'Listen for connections
  1105. Call Listening
  1106.         Case False: 'Guest
  1107.            'Try to connect
  1108. Call Connecting
  1109.     End Select
  1110. End Sub
  1111. Private Sub cmdSendMail_Click()
  1112. On Error GoTo ErrorHandling
  1113.     SendEmail txtEmailServer.Text, txtFromEmailAddress.Text, txtFromEmailAddress.Text, txtToEmailAddress.Text, txtToEmailAddress.Text, txtEmailSubject.Text, txtEmailBodyOfMessage.Text
  1114.  MsgBox ("Mail Sent")
  1115.     StatusTxt.Caption = "Mail Sent"
  1116.     StatusTxt.Refresh
  1117.     Beep
  1118.     Close
  1119. ErrorHandling:
  1120. Winsock2.Close
  1121. End Sub
  1122. Private Sub mnuAbout_Click()
  1123. frmAbout.Show
  1124. End Sub
  1125. Private Sub mnuColor_Click()
  1126. On Error GoTo Cancel
  1127. CommonDialog1.ShowColor
  1128. frmChat.BackColor = CommonDialog1.Color
  1129. Cancel:
  1130. End Sub
  1131. Private Sub mnuExit_Click()
  1132. Unload Me
  1133. End Sub
  1134. Private Sub mnuFrameCapColor_Click()
  1135. On Error GoTo Cancel
  1136. CommonDialog1.ShowColor
  1137. FrameSendText.ForeColor = CommonDialog1.Color
  1138. FrameUtility.ForeColor = CommonDialog1.Color
  1139. FrameSendEmail.ForeColor = CommonDialog1.Color
  1140. FrameCheckEmail.ForeColor = CommonDialog1.Color
  1141. FrameCounter.ForeColor = CommonDialog1.Color
  1142. FrameConnectOptions.ForeColor = CommonDialog1.Color
  1143. FrameStatus.ForeColor = CommonDialog1.Color
  1144. FrameSendEmailStatus.ForeColor = CommonDialog1.Color
  1145. FrameCheckEmailStatus.ForeColor = CommonDialog1.Color
  1146. Cancel:
  1147. End Sub
  1148. Private Sub mnuFrameColor_Click()
  1149. On Error GoTo Cancel
  1150. CommonDialog1.ShowColor
  1151. FrameSendText.BackColor = CommonDialog1.Color
  1152. FrameUtility.BackColor = CommonDialog1.Color
  1153. FrameSendEmail.BackColor = CommonDialog1.Color
  1154. FrameCheckEmail.BackColor = CommonDialog1.Color
  1155. FrameCounter.BackColor = CommonDialog1.Color
  1156. FrameConnectOptions.BackColor = CommonDialog1.Color
  1157. FrameStatus.BackColor = CommonDialog1.Color
  1158. FrameSendEmailStatus.BackColor = CommonDialog1.Color
  1159. FrameCheckEmailStatus.BackColor = CommonDialog1.Color
  1160. optUtility(0).BackColor = CommonDialog1.Color
  1161. optUtility(1).BackColor = CommonDialog1.Color
  1162. optUtility(2).BackColor = CommonDialog1.Color
  1163. lblCaption(0).BackColor = CommonDialog1.Color
  1164. lblCaption(1).BackColor = CommonDialog1.Color
  1165. lblCaption(2).BackColor = CommonDialog1.Color
  1166. lblCaption(3).BackColor = CommonDialog1.Color
  1167. lblCaption(4).BackColor = CommonDialog1.Color
  1168. chkLogStatus.BackColor = CommonDialog1.Color
  1169. optHostGuest(0).BackColor = CommonDialog1.Color
  1170. optHostGuest(1).BackColor = CommonDialog1.Color
  1171. LabelAddress.BackColor = CommonDialog1.Color
  1172. labelPort.BackColor = CommonDialog1.Color
  1173. LabelNick.BackColor = CommonDialog1.Color
  1174. Label1.BackColor = CommonDialog1.Color
  1175. Label2.BackColor = CommonDialog1.Color
  1176. Label3.BackColor = CommonDialog1.Color
  1177. Label5.BackColor = CommonDialog1.Color
  1178. Label6.BackColor = CommonDialog1.Color
  1179. Label7.BackColor = CommonDialog1.Color
  1180. StatusTxt.BackColor = CommonDialog1.Color
  1181. Cancel:
  1182. End Sub
  1183. Private Sub mnuHelpContents_Click()
  1184. Shell "winhelp.exe coolchat.hlp", vbNormalFocus
  1185. End Sub
  1186. Private Sub cmdCheckEmail_Click()
  1187. Dim nMonitorPort As Integer
  1188. Dim sServer As String
  1189.     'Get the Value used for the server name
  1190.     sServer = txtServer.Text
  1191.     If Len(sServer) = 0 Then
  1192.         MsgBox "Plese enter the POP3 server name"
  1193.        
  1194.         Exit Sub
  1195.     End If
  1196. 'Get the value used for the port connection
  1197. nMonitorPort = CInt(txtPort.Text)
  1198. If nMonitorPort = 0 Then
  1199.     MsgBox "Please enter the POP3 server and Port (Default = 110)"
  1200.     Exit Sub
  1201. End If
  1202. 'Error checking for username and password has been
  1203. 'left out intentionally to show the error messages
  1204. 'returned by the POP3 Server
  1205. cmdCheckEmail.Enabled = False
  1206. 'Connect and get the message count
  1207. lstStatus.Clear
  1208. Call POP3CheckMail
  1209. cmdCheckEmail.Enabled = True
  1210. End Sub
  1211. Private Sub optHostGuest_Click(Index As Integer)
  1212. 'Does something when either Guest or Host value is checked
  1213. '(Not pushing the connect button, just clicking the options)
  1214.     Select Case Index
  1215.        
  1216.        Case 0: 'Host value is clicked on
  1217.             'Automatically paste your IP# in the Address box
  1218.            
  1219.           IP = Winsock1.LocalIP
  1220.           txtIP.Text = IP
  1221.            'Prevent the address from being changed
  1222.            txtIP.Locked = True
  1223.           txtIP.Enabled = False
  1224.           cmdConnect.Caption = "Listen"
  1225.         StatusBar1.Panels(1).Text = "HOST MODE"
  1226.        
  1227.        Case 1: 'Guest value is clicked on
  1228.               txtIP.Text = "localhost"
  1229.           cmdConnect.Caption = "Connect"
  1230.        txtIP.Locked = False
  1231.         txtIP.Enabled = True
  1232.         StatusBar1.Panels(1).Text = "GUEST MODE"
  1233.           
  1234.     End Select
  1235. End Sub
  1236. Private Sub cmdSendText_Click()
  1237. 'Send Text to other party
  1238. Winsock1.SendData txtNick.Text & ":  " & txtSendText.Text
  1239. 'Display YOUR text on your screen, too
  1240. txtIncomingData.Text = txtIncomingData.Text + vbCrLf + txtNick.Text + ": " + txtSendText.Text
  1241. 'Make the text box blank after we send the text.
  1242. 'otherwise, we'd have to erase all the characters before
  1243. 'sending a new message, EVERYTIME
  1244. txtSendText.Text = ""
  1245. End Sub
  1246. Private Sub Form_Load()
  1247.         StatusBar1.Panels(1).Text = "GUEST MODE"
  1248. cmdSendText.Enabled = False
  1249. txtSendText.Enabled = False
  1250. FrameCounter.Visible = False
  1251. txtIncomingData.Text = "Welcome to Cool Chat!" & vbCrLf & _
  1252.  "Click on this screen to clear the text at anytime."
  1253. StatusBar1.Panels(2).Text = "Cool Chat v" & App.Major & "." & App.Minor & "." & App.Revision & "  - MDSoftware"
  1254. 'Check Email variables
  1255. 'Load the variant arrary with socket states
  1256. mvntSocketState = Array("Closed", "Opening", "Listening", "Connection Pending", "Resolving Host", "Host Resolved", "Connecting", "Connected", "Closing", "Error")
  1257.                         
  1258. 'Initialize the log status state to false
  1259. mbLogStatus = False
  1260. End Sub
  1261. Private Sub optUtility_Click(Index As Integer)
  1262. Select Case Index
  1263. Case 0: 'Connection Options
  1264. FrameConnectOptions.Visible = True
  1265. FrameSendEmail.Visible = False
  1266. FrameCheckEmail.Visible = False
  1267. Case 1: 'Send Email
  1268. FrameConnectOptions.Visible = False
  1269. FrameSendEmail.Visible = True
  1270. FrameCheckEmail.Visible = False
  1271. IP = Winsock1.LocalIP
  1272. txtEmailBodyOfMessage.Text = "My IP number is: " & IP
  1273. Case 2: ' Check Email
  1274. FrameConnectOptions.Visible = False
  1275. FrameSendEmail.Visible = False
  1276. FrameCheckEmail.Visible = True
  1277. End Select
  1278. End Sub
  1279. Private Sub tmrClock_Timer()
  1280. 'This does nothing but simply display an online timer
  1281. 'when a connection is complete
  1282. 'Note if you want to make a timer like this, make sure
  1283. 'you set the Interval in Properties to 1000
  1284. 'Simplest form to do a timer is:
  1285. 's = s + 1
  1286. 'Label1.Caption = s (for Label) or Text1.Text = s (for text)
  1287. 'Just those 2 lines will make you a seconds counter.
  1288. s = s + 1
  1289. 'When seconds gets to 60, then restart to 0 and add 1 to minutes
  1290. If s = 60 Then
  1291. s = 0
  1292. m = m + 1
  1293. End If
  1294. 'When the first minutes is reached display it
  1295. If m > 0 Then
  1296. lblMinutes.Caption = m
  1297. End If
  1298. lblSeconds.Caption = s
  1299. End Sub
  1300. Private Sub tmrFlash_Timer()
  1301. Static blnImage1 As Boolean
  1302. If blnImage1 Then
  1303. imgConnecting.Picture = ImageList1.ListImages(1).Picture
  1304. imgConnecting.Picture = ImageList1.ListImages(2).Picture
  1305. End If
  1306. blnImage1 = Not blnImage1
  1307. End Sub
  1308. Private Sub txtIncomingData_Change()
  1309. 'Makes the chat screen auto scroll
  1310. 'BTW, Len is used to tell you the length (# of characters)
  1311. 'in a text ("string") Variable
  1312. txtIncomingData.SelStart = Len(txtIncomingData)
  1313. End Sub
  1314. Private Sub txtIncomingData_Click()
  1315. txtIncomingData.Text = ""
  1316. End Sub
  1317. Private Sub txtSendText_KeyPress(KeyAscii As Integer)
  1318.    If KeyAscii = 13 Then 'If user pressed 'Enter'
  1319.       cmdSendText_Click 'click 'Send' button
  1320.       KeyAscii = 0 'Make sure it doesnt write enter to txtText
  1321.    End If
  1322. End Sub
  1323. Private Sub Winsock1_Close()
  1324. 'What happens when a connection is closed/terminated
  1325.     Select Case optHostGuest(0).Value
  1326.         Case True:  'Host closed Winsock
  1327. cmdConnect_Click    'Click the Disconnect button
  1328. cmdConnect_Click     'Click Listen button again for Listen Mode
  1329. MsgBox "Connection terminated by Guest. Server has been reset and awaiting a new client..."
  1330.         Case False: 'Guest closed Winsock
  1331. MsgBox "Connection terminated by Host..."
  1332. cmdConnect_Click     'Push the disconnect button to make offline
  1333.                     
  1334.     End Select
  1335. End Sub
  1336. Private Sub Winsock1_Connect()
  1337.     Select Case optHostGuest(0).Value
  1338.         
  1339.         Case True:  'Host got a connection
  1340. 'I left this blank because the "CLIENT CONNECTED" msg
  1341. 'is displayed below in the Winsock1_ConnectionRequest Sub
  1342. 'along with the Call Online command
  1343.         Case False: 'Guest got a connection
  1344. Call Online
  1345. StatusBar1.Panels(2).Text = "CONNECTED TO HOST"
  1346. End Select
  1347. 'Turn on and show Online Timer
  1348. FrameCounter.Visible = True
  1349. tmrClock.Enabled = True
  1350. End Sub
  1351. Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
  1352. 'When Host received a Connection Request...
  1353. If Winsock1.State <> sckClosed Then
  1354.     Winsock1.Close
  1355. Winsock1.LocalPort = txtPort.Text
  1356. Winsock1.Accept requestID 'accept the connection
  1357. Online
  1358. StatusBar1.Panels(2).Text = "CLIENT CONNECTED"
  1359. FrameCounter.Visible = True
  1360. tmrClock.Enabled = True
  1361. End If
  1362. End Sub
  1363. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
  1364. 'Get incoming chat data and put it in the Text Box
  1365. Dim Data As String
  1366. Winsock1.GetData Data 'gets the data
  1367. txtIncomingData.Text = txtIncomingData.Text + vbCrLf & Data
  1368. End Sub
  1369. Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
  1370. 'What to do if an error occurs, this usually happens
  1371. 'the Host is not Listening or your ISP is down
  1372. StatusBar1.Panels(2).Text = "WINSOCK ERROR: " & Err
  1373. cmdConnect_Click   'Push the disconnect button to reset
  1374. MsgBox "UNABLE TO CONNECT..."
  1375. End Sub
  1376. '#################### END CHAT SUBS ###############
  1377. '#################### SEND EMAIL SUBS #######################
  1378. Sub SendEmail(MailServerName As String, FromName As String, FromEmailAddress As String, ToName As String, ToEmailAddress As String, EmailSubject As String, EmailBodyOfMessage As String)
  1379.   On Error GoTo ErrorHandler
  1380.     Winsock2.LocalPort = 0 ' Must set local port to 0 (Zero) or you can only send 1 e-mail pre program start
  1381. If Winsock2.State = sckClosed Then ' Check to see if socet is closed
  1382.     DateNow = Format(Date, "Ddd") & ", " & Format(Date, "dd Mmm YYYY") & " " & Format(Time, "hh:mm:ss") & "" & " -0600"
  1383.     first = "mail from:" + Chr(32) + FromEmailAddress + vbCrLf ' Get who's sending E-Mail address
  1384.     Second = "rcpt to:" + Chr(32) + ToEmailAddress + vbCrLf ' Get who mail is going to
  1385.     Third = "Date:" + Chr(32) + DateNow + vbCrLf ' Date when being sent
  1386.     Fourth = "From:" + Chr(32) + FromName + vbCrLf ' Who's Sending
  1387.     Fifth = "To:" + Chr(32) + ToEmailAddress + vbCrLf ' Who it going to
  1388.     Sixth = "Subject:" + Chr(32) + EmailSubject + vbCrLf ' Subject of E-Mail
  1389.     Seventh = EmailBodyOfMessage + vbCrLf ' E-mail message body
  1390.     Ninth = "X-Mailer: EBT Reporter v 2.x""To:" + Chr(32Y2Frames  Undeext         =   2>''ng, EmaendText_CiTFalse
  1391. txtSenquest Ss") f ' EpmmonDiacelpContFalse
  1392. txtSenquest Ss") f ' Ewen is used to tell you N, thiT(32Y2F=     'o thep.Major & "." & App.Minor & "." &d  "Contenalog1.Colin a textt0pd") & "/
  1393.    CaltmdCheckEll you NLdgir3) + Frou ' E-mail mesrty Font 
  1394.  e it dTg Frou ' ' ' ' 24
  1395.     CTE(2), By=hat ho+ vbCd
  1396. Framer()
  1397. If io+ vbCdow + v1
  1398.   lpFila2v = 110)"
  1399. o.net
  1400. de'request(ByVal statuy Foe i Format(Time,ate Subsae
  1401. Winsock1nection
  1402. u-a NLdgir3) + Fp.ust clicking NLdgir1o = TruykColoBS #################bCd
  1403. Framer()
  1404. Framor
  1405. chkLogStatus.BackColor =  As Long, ByVal S SeByVal S SeByVal S SeByVof E-Mail
  1406.     SeiS.Pane   13
  1407.      port to 0 (=s
  1408. txtLn theng, 
  1409. '###############m####cv being sent
  1410.     Fourth = "Fn leave as LocaliuA.=hatS S   Sevent e-maabled = False
  1411. se optHnDthe POPo t,g, 
  1412. '##Array("CIP.Texuursalog1.ryct" Or cmdConneS p desc"Subject: a ENr(3oes something wheer()
  1413.  Four  
  1414.   T 8.25
  1415.          Charset         =  Dalse: '    Ninth tusBar Winr:e   Italic       YYY")efy discofy dis)i FromEma
  1416. End Sub
  1417. '#################### END CHAT SUBS ###############
  1418. '#################### SEND EMAIL SUBSa######## END CHAT SUBS ###        Exs)txtIP.Enabled r ve enter the Pncomind = False
  1419. End Sub
  1420. 2(mmonDialog1.Com YYYY") & " "r = CommonDialog1.Color
  1421. optUtility(1).BackColor =    UnderliUd ponDiaEnd Sub
  1422. vwe areosic Sub ConP"
  1423.  w+ vbCrLf  CHAT S= CommonDNL   SrOme
  1424. End Sub
  1425. wext at 'IxtIP'hConP"
  1426. FrameuckColor =ocus
  1427. !e v 2.x""Tr ho+ Case False: 'r1o = TrlerDNtlosed WinP"
  1428. FrameuckColor =ocus
  1429. !ei   polor =o
  1430. 's = s o i Format(TiPUcBar WWh Sub
  1431. wexalog1.Co(-Private Sub WMS Sanso i Format(TiPUcBar m24
  1432.     CTE(2), By=hat d W FroMajor & 
  1433. '#######.Visible = True
  1434. is)i FromEma
  1435. En.25
  1436. Dim Dt_Cittton is checkb WMSpmmonDiao1.Sen
  1437. 'LaID 'accept the connectioAr.25
  1438. Dim uListbessagAddress bochaolorororororbocI5bi.Text, txtToEmail&d  "Contenalog1.Colin a tlEin a tlEin a tlEin a tlEwexal' i arou ' ox txtTo i a5bi.Text, txtToEmail&d  "ContenaloElor = CommonDS TO CONNECT..."
  1439. o the Texuash.Enabledake sure
  1440. ZuA.=hin a tlEntenrtPort 
  1441.        ngDatONNECT...     u####### SEND EMAIL SUBSa#######addresFalse: re h,xal' tGuestsfsa###en
  1442. s = 0
  1443. FrameSendE
  1444. Dim Dtfw   Backoc user pressed 'Enter'
  1445. ) mgOfflOb$Wress bochaolorororororbocI5bi.Te     7 TrlerDN
  1446. Dimjr'
  1447. )mjr'
  1448. )mj(1).BackColoor = r and Port (Default = 110ng sent Left    cI' Chat!" ult Eknd Port (Default = 110ng sent Left    cI' Chat!" ult Eknd PortOw aolo oQ=lerDN
  1449. Dimjr' 110ngmdCheckEmailt =ocus
  1450. =oKte 110ng rt (Default = 11!" ult ed for the portce As String.     u#>rr'p(Default olor
  1451. op.     u#>r 11!" ultEl0ng rt (D"IColo Four  
  1452.   T 8.25
  1453.          Charset       e optHEn 
  1454. End (Zero) or yo  'set     Winolor
  1455. Cannolor True
  1456. IxtIP'hCchaolorororod TO CONN:ltmdChNow = Forma2
  1457.    Nst be Offareosic Sub immonDialog1
  1458. Dimj=J = CTw> client)3d U(ail
  1459.     SeiS.Pane  ) & ", " & Format(Date, "dd Mmm YUcBar WWh Sub
  1460. wexhing the connect button,or
  1461. LabelNicSeiS.Pane  ) & "r True
  1462. IxtIP'hCchaolorororoMsgPaneameCapCgPaneameline, so do tNst be Offareosic Sub immonDiallient)3d U(ail
  1463.     SeiS.Pane  ) &r yo  'sMsgPan
  1464. Winsr True
  1465. IxtIP'heline, 'Enter'
  1466. ) mgO or Host  port tEpmmonDia
  1467.  Foo oQ=lerDN
  1468. Dimjr' 110nIt (Defaulosi
  1469. ir Host  port tEpmpmpmpmpmpmpmpmpmpmpmpmpmpmpm*alse
  1470. t!" 0pmpmpmpmpuDl Q=lerDN
  1471. Dimjr' 110ngs String, ost  port tEpmmontEpieckb WMSpmmonDiPOPo t,g, Po t,wX(is closVisible = False
  1472. cmdSendText.Enabl6tbWMSu1M     d/terminates usedptHs=   1tonDSr1vaolorororororbocI5bi.monngDatvaolorororlse
  1473.       EDN
  1474. Dimjr s cl jrDN
  1475. txtIP.Lockenin 
  1476. rst w.Minor &wEmail   If
  1477. Ce Frou 't
  1478. FrameConnecconnection is complete
  1479. 'Noible =monngDatv*ou 't
  1480. False
  1481. ck1_ConnecMr  's# BEGIN  BEGIrty Font 
  1482. CeSpmmonR*ou  
  1483. M" f ' Epmmo, Email)(Rdo d tnect
  1484.         
  1485.      etc
  1486. 'Pa t
  1487.       etionr tIN  BEGIrty Font 
  1488. CeSpmmonR*ous)yp2Dous)yp2Dse
  1489. cmIColo      0'#############iTWx ult Eknd 'cmIColtxtText
  1490.  - ' SubSUBS ###e epFalse
  1491. txtSend('our st1.Listt
  1492.  - tHtxt) &r yo or       =) &r yo or  SubSUBS  dndText.T scmIe Frou 't
  1493. Framock1_DatN 't
  1494. Fra.Coa,or  SubS
  1495. txtItGuest(0).Enaly paY = False
  1496. 4nTE(2), B 2:  ection Pending",  scmIe Frou 't
  1497. Fr rt (D"Iont 
  1498. CeSpmmonR*ous)yp2DoC"dd MmmroroMsg  Weight    qrou 'ts=t= T1e  ) & "dcin ng senoscofyTkEll you NLdgir3) + Frou ' el1.CaptDSr pressed 'Enter'
  1499. ) mgOfflOb$W:roroUnderlij=J = CTw> client)3d U(ail
  1500.     SeiS.Pane  ) & ", " & Format(Date, "dd Mmm YUcBar WWh Sub
  1501. wexhing the connect button,or
  1502. LabelNicSeiS.Pane  ) & "r True
  1503. IxtIP'hCchaolorororoMsge
  1504. End Surs As String, ToNan
  1505. 10ngmdC######
  1506. (shmonDia
  1507.  Foo oQ=lerDpaY = False
  1508.  txtIPD Inu mnuFra'IP'hCchaol 
  1509. nd LabelNis Fooextror")
  1510. .Pano Four  
  1511.   T 8.")
  1512. .PandCL 8."wVameuc
  1513.     Fourth = )onDia
  1514.  Foo oQ=l      e optHEnt       mpuDl Q=lerDNtY = Fa T 8.")5ick   'c'When the first minutes is    mpfirs   ye= True
  1515. is)it.Caption = "Mail SenmingData)
  1516. End SuR oQ=l      e opt t0FF8080&
  1517.          Caption         =   "Addresss   ye=Enaly checkEmadConn6TWx ult Ek3     et, t
  1518.   opt t0FF8080&
  1519.  g= SeiS13
  1520.      *   =          =sved a Connection Request...
  1521. If Winsock1.State <> sckClose)sserver")kClose)sserveon leavei.T1scmmeCheck*  ' E-marlo: t0FF808Seckb WMSoCat d W F cmdConnnectiolSe 
  1522. nd LabelNislf the HoP  ' E-maion =  data
  1523.    .wot to:" + 
  1524.     yan on1sparty
  1525. CattE=o
  1526. 'sc(=.T scmIe Fr", Email)(Rdo d tnect
  1527.         
  1528.      ete
  1529. tx &wEmail  .wot to:" + 
  1530. 'PeLeft    cIf  the WiEptHEn
  1531.         
  1532. t3*,  
  1533. t3*,.Caption = m
  1534. ail)(gin VB.TP.Loatv*ouVB.Lap2Dse
  1535. c   'c'vyail
  1536.   from:" +abledakeWd 'c'v EmailBodyOfMessagSwd a tlEiu2e firram
  1537. 'PeLeft    cIf  the WiEptHEn
  1538.         
  1539. t3**ous)yp
  1540.  g= SeiEmailBodyOfMEpta tlEiu2e fiLn theamelineo
  1541. 'TurnuEmailBodyOfMes   opt tr
  1542.   d'eectio
  1543.  g= Seiex
  1544. ielabelPo put them up here whicipie WiEptH&wEma    i a
  1545. FalsennuEma =          =
  1546. t3rminutes tlEiu2e  YYYY") & " " &uFra'IP'hCchnHostLap2Dse
  1547. c   'c''fMes   o1, ByVat states
  1548. mvntSocketState1
  1549. 'LBS  dndyrou ' ogAddb txtI= Fals Frou 'ion & " yOfM Offareosic Sub iQuoo oQ=lerDN
  1550. e whicip    xtIP.Ennd
  1551. 'tha<> sckCosic Sub iQuoo o
  1552.          TuEmailBodyOfMes 0L 
  1553. '= ""
  1554. Dim uListbe  fir  
  1555. oonDiacmMe
  1556. IxtIP'hio+ vbal in Prope goP  ock
  1557. cmdConnect_ClicMes 0L 
  1558. ") & " " &s Seriaptiuevate Foo oQ=ler  
  1559. 'Get the valuee whicip    xcin ng se  & " " =k
  1560. cmdC 
  1561. 'NED Email.Visible = False
  1562. FrameCheckEmail.Visible = True
  1563. End Select
  1564. End Sub
  1565. Pr-,mhe first minutes isString. =lerDorns SeriaaLabel6.Bafirram
  1566. 'PeLeft    cIf  the WiEptHEn
  1567.         
  1568. howColorTfMes   o the WinSent)3d" = CommotDSr p3
  1569. cmdCocI5bi.Textriapt b mnuHelpContents_Click()
  1570. Sent)3d" = CommotDSr pWin= b mnuHelpContenOffareosic S   lpFila2vr'
  1571. lblSeconds.Cap=Q=l          cIf se  & " " =k
  1572. cmdC3cmdCocI5be
  1573. AttrilblSecondeft    e Win" cIf se)u N, thiT(32Y2F= e =lseipid
  1574.  olororoHEn
  1575.   l - MDSoftwartBox txtPort 
  1576.      3d" = meline, 'Enter'
  1577. ) mgO or Host  port tEpmmonDia
  1578.  Foo oQ=le  7 Trlo= 0 'M E-m Keyen Prope gi:t tte Sub = meline, 'Enter'
  1579. ) mgO o 'Enter'
  1580. .     u#>rr'p(portt    cIft Cat tEpmm:s SertIPuongect
  1581. I= Fals Frou 'ion & " yOfM O Ke0 'M Email.Visible 6tX Hostxtd To:"
  1582.          BeginPrstxtttttttttttttt iSertIPuon    
  1583. If O Keoo
  1584. txtI   Le'   DN
  1585. abelNis+ 1
  1586. Ee-=  data oQ=lPr-,mhage1
  1587. End Sub
  1588. dLeft    cIf  t+t't
  1589. Fra6.Back xcin ng se   Enn= CTw
  1590. txtImpfirs  we'd have to erase a
  1591. !ei+Check*  ' E-ma  EnnU
  1592. !ei+Check*  ' E-ma  EnnU
  1593. !ei+Che txtPor    dfareosic Sub aub aConput + v1
  1594.   lpFila2v = 110)"
  1595.     SeledfouFra'heck*  ' r  xuO"n'theng,
  1596.