home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / NIVB_SRC / TTS.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-06-02  |  2.2 KB  |  61 lines

  1. VERSION 2.00
  2. Begin Form TTSForm 
  3.    Caption         =   "TTS Services Test"
  4.    Height          =   2685
  5.    Left            =   1950
  6.    LinkTopic       =   "Form1"
  7.    ScaleHeight     =   2280
  8.    ScaleWidth      =   7320
  9.    Top             =   1155
  10.    Width           =   7440
  11.    Begin ListBox ServerList 
  12.       FontBold        =   -1  'True
  13.       FontItalic      =   0   'False
  14.       FontName        =   "Courier"
  15.       FontSize        =   9.75
  16.       FontStrikethru  =   0   'False
  17.       FontUnderline   =   0   'False
  18.       Height          =   1395
  19.       Left            =   120
  20.       TabIndex        =   1
  21.       Top             =   120
  22.       Width           =   7095
  23.    End
  24.    Begin CommandButton OKButton 
  25.       Caption         =   "&OK"
  26.       Height          =   375
  27.       Left            =   3120
  28.       TabIndex        =   0
  29.       Top             =   1800
  30.       Width           =   855
  31.    End
  32. Sub Form_Load ()
  33.     prefConnID% = GetPreferredConnectionID()
  34.     For connID% = 1 To 8
  35.         'for each connection in workstation's file server name table
  36.         'get the table entry, then see if it's null
  37.         
  38.         serverName$ = String$(48, 0)
  39.         If (IsConnectionIDInUse(connID%) = 1) Then
  40.             GetFileServerName connID%, serverName$
  41.             serverName$ = Left$(serverName$, InStr(serverName$, Chr$(0)) - 1)
  42.             If (Len(serverName$) > 20) Then
  43.                 serverName$ = Left$(serverName$, 20)
  44.             End If
  45.             SetPreferredConnectionID (connID%)
  46.             ttsAvail% = TTSIsAvailable()
  47.             If (ttsAvail% = 1) Then
  48.                 ServerList.AddItem Str$(connID%) + "  " + serverName$ + String$(22 - Len(serverName$), " ") + " TTS is available"
  49.             ElseIf (ttsAvail% = 253) Then
  50.                 ServerList.AddItem Str$(connID%) + "  " + serverName$ + String$(22 - Len(serverName$), " ") + " TTS is disabled"
  51.             Else
  52.                 ServerList.AddItem Str$(connID%) + "  " + serverName$ + String$(22 - Len(serverName$), " ") + " TTS is not available"
  53.             End If
  54.         End If
  55.     Next connID%
  56.     SetPreferredConnectionID (prefConnID%)
  57. End Sub
  58. Sub OKButton_Click ()
  59.     Unload TTSForm
  60. End Sub
  61.