home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / nivb_src / afp.frm < prev    next >
Text File  |  1993-06-02  |  3KB  |  98 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. End
  58. Sub CancelButton_Click ()
  59.     Unload AFPForm
  60. End Sub
  61.  
  62. Sub Form_Load ()
  63.     For connID% = 1 To 8
  64.         'for each connection in workstation's file server name table
  65.         'get the table entry, then see if it's null
  66.         
  67.         serverName$ = String$(48, 0)
  68.  
  69.         If (IsConnectionIDInUse(connID%) = 1) Then
  70.             GetFileServerName connID%, serverName$
  71.             serverName$ = Left$(serverName$, InStr(serverName$, Chr$(0)) - 1)
  72.             If (Len(serverName$) > 20) Then
  73.                 serverName$ = Left$(serverName$, 20)
  74.             End If
  75.  
  76.             If (AFPSupported(connID%) = 1) Then
  77.                 ServerList.AddItem Str$(connID%) + "  " + serverName$ + String$(22 - Len(serverName$), " ") + " AFP Supported"
  78.             Else
  79.                 ServerList.AddItem Str$(connID%) + "  " + serverName$ + String$(22 - Len(serverName$), " ") + " AFP Not Supported"
  80.             End If
  81.         End If
  82.     Next connID%
  83.  
  84.     ServerList.ListIndex = 0
  85.     AFPForm.Show
  86.     SearchButton.SetFocus
  87. End Sub
  88.  
  89. Sub SearchButton_Click ()
  90.     currentForm = AFP_FORM
  91.     SelectFileForm.Show
  92. End Sub
  93.  
  94. Sub ServerList_DblClick ()
  95.     SearchButton_Click
  96. End Sub
  97.  
  98.