home *** CD-ROM | disk | FTP | other *** search
/ Chip Special: HTML & Java / Chip-Special_1997-01_HTML-a-Java.bin / chatsdk / chatsdk.exe / WHISPTOH.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-12-12  |  3.5 KB  |  113 lines

  1. VERSION 4.00
  2. Begin VB.Form WhispToHosts 
  3.    BackColor       =   &H00FFFFC0&
  4.    Caption         =   "Whisper to Hosts"
  5.    ClientHeight    =   3855
  6.    ClientLeft      =   2055
  7.    ClientTop       =   2010
  8.    ClientWidth     =   7125
  9.    Height          =   4260
  10.    Left            =   1995
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   3855
  13.    ScaleWidth      =   7125
  14.    Top             =   1665
  15.    Width           =   7245
  16.    Begin VB.TextBox txtMessage 
  17.       BeginProperty Font 
  18.          name            =   "MS Sans Serif"
  19.          charset         =   0
  20.          weight          =   400
  21.          size            =   9.75
  22.          underline       =   0   'False
  23.          italic          =   0   'False
  24.          strikethrough   =   0   'False
  25.       EndProperty
  26.       Height          =   2895
  27.       Left            =   2640
  28.       MultiLine       =   -1  'True
  29.       ScrollBars      =   2  'Vertical
  30.       TabIndex        =   0
  31.       Top             =   360
  32.       Width           =   4335
  33.    End
  34.    Begin VB.CommandButton Cancel 
  35.       Caption         =   "Cancel"
  36.       Height          =   375
  37.       Left            =   6120
  38.       TabIndex        =   3
  39.       Top             =   3360
  40.       Width           =   855
  41.    End
  42.    Begin VB.CommandButton cmdOK 
  43.       Caption         =   "OK"
  44.       Height          =   375
  45.       Left            =   5040
  46.       TabIndex        =   2
  47.       Top             =   3360
  48.       Width           =   855
  49.    End
  50.    Begin VB.ListBox lstHosts 
  51.       Height          =   3375
  52.       Left            =   120
  53.       MultiSelect     =   2  'Extended
  54.       TabIndex        =   1
  55.       Top             =   360
  56.       Width           =   2295
  57.    End
  58.    Begin VB.Label Label2 
  59.       BackColor       =   &H00FFFFC0&
  60.       Caption         =   "Message To Whisper:"
  61.       Height          =   210
  62.       Left            =   2640
  63.       TabIndex        =   5
  64.       Top             =   120
  65.       Width           =   1695
  66.    End
  67.    Begin VB.Label Label1 
  68.       BackColor       =   &H00FFFFC0&
  69.       Caption         =   "Host List:"
  70.       Height          =   205
  71.       Left            =   120
  72.       TabIndex        =   4
  73.       Top             =   120
  74.       Width           =   735
  75.    End
  76. Attribute VB_Name = "WhispToHosts"
  77. Attribute VB_Creatable = False
  78. Attribute VB_Exposed = False
  79. Option Explicit
  80. Private Sub Cancel_Click()
  81.     txtMessage.Text = ""
  82.     Hide
  83. End Sub
  84. Private Sub cmdOK_Click()
  85.     On Error Resume Next
  86.     ' get the selected hosts and construct an array of longs
  87.     Dim rglHostIDs(0 To 15) As Long
  88.     Dim nCnt As Integer
  89.     Dim nArrayIndex As Integer
  90.     nArrayIndex = 0
  91.     For nCnt = 0 To lstHosts.ListCount - 1
  92.         If lstHosts.Selected(nCnt) Then
  93.             If nArrayIndex > 15 Then
  94.                 MsgBox "Too many hosts are selected. You are limited to 10 hosts.", vbOKOnly, "Executive Chat Monitoring Tool"
  95.                 Exit For
  96.             End If
  97.             If (lstHosts.ItemData(nCnt) <> ExecC.MSChat.ThisParticipantID) Then
  98.                 rglHostIDs(nArrayIndex) = lstHosts.ItemData(nCnt)
  99.                 nArrayIndex = nArrayIndex + 1
  100.             End If
  101.         End If
  102.     Next nCnt
  103.     If (ExecC.MSChat.State = 3 And nArrayIndex > 0 And txtMessage.Text <> "") Then
  104.         ExecC.MSChat.SendMessage rglHostIDs, nArrayIndex, Trim(txtMessage.Text)
  105.     End If
  106.     txtMessage.Text = ""
  107.     Hide
  108. End Sub
  109. Private Sub Form_Activate()
  110.     On Error Resume Next
  111.     txtMessage.SetFocus
  112. End Sub
  113.