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

  1. VERSION 2.00
  2. Begin Form AFPForm 
  3.    Caption         =   "Test NetWare AFP Services"
  4.    Height          =   3510
  5.    Left            =   2430
  6.    LinkMode        =   1  'Source
  7.    LinkTopic       =   "Form5"
  8.    ScaleHeight     =   3105
  9.    ScaleWidth      =   6645
  10.    Top             =   1245
  11.    Width           =   6765
  12.    Begin CommandButton SearchButton 
  13.       Caption         =   "&Search"
  14.       Height          =   375
  15.       Left            =   2160
  16.       TabIndex        =   2
  17.       Top             =   2640
  18.       Width           =   855
  19.    End
  20.    Begin ListBox ServerList 
  21.       FontBold        =   -1  'True
  22.       FontItalic      =   0   'False
  23.       FontName        =   "Courier"
  24.       FontSize        =   9.75
  25.       FontStrikethru  =   0   'False
  26.       FontUnderline   =   0   'False
  27.       Height          =   1590
  28.       Left            =   120
  29.       TabIndex        =   1
  30.       Top             =   480
  31.       Width           =   6375
  32.    End
  33.    Begin CommandButton CancelButton 
  34.       Caption         =   "&Cancel"
  35.       Height          =   330
  36.       Left            =   3720
  37.       TabIndex        =   0
  38.       Top             =   2640
  39.       Width           =   870
  40.    End
  41.    Begin Label Label2 
  42.       Caption         =   "Attached file servers:"
  43.       Height          =   255
  44.       Left            =   120
  45.       TabIndex        =   4
  46.       Top             =   120
  47.       Width           =   2055
  48.    End
  49.    Begin Label Label1 
  50.       Caption         =   "Click Search to view AFP information for a selected file."
  51.       Height          =   255
  52.       Left            =   840
  53.       TabIndex        =   3
  54.       Top             =   2280
  55.       Width           =   4815
  56.    End
  57. Sub CancelButton_Click ()
  58.     Unload AFPForm
  59. End Sub
  60. Sub Form_Load ()
  61.     For connID% = 1 To 8
  62.         'for each connection in workstation's file server name table
  63.         'get the table entry, then see if it's null
  64.         
  65.         serverName$ = String$(48, 0)
  66.         If (IsConnectionIDInUse(connID%) = 1) Then
  67.             GetFileServerName connID%, serverName$
  68.             serverName$ = Left$(serverName$, InStr(serverName$, Chr$(0)) - 1)
  69.             If (Len(serverName$) > 20) Then
  70.                 serverName$ = Left$(serverName$, 20)
  71.             End If
  72.             If (AFPSupported(connID%) = 1) Then
  73.                 ServerList.AddItem Str$(connID%) + "  " + serverName$ + String$(22 - Len(serverName$), " ") + " AFP Supported"
  74.             Else
  75.                 ServerList.AddItem Str$(connID%) + "  " + serverName$ + String$(22 - Len(serverName$), " ") + " AFP Not Supported"
  76.             End If
  77.         End If
  78.     Next connID%
  79.     ServerList.ListIndex = 0
  80.     AFPForm.Show
  81.     SearchButton.SetFocus
  82. End Sub
  83. Sub SearchButton_Click ()
  84.     currentForm = AFP_FORM
  85.     SelectFileForm.Show
  86. End Sub
  87. Sub ServerList_DblClick ()
  88.     SearchButton_Click
  89. End Sub
  90.