home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / nivb / afp.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-07  |  3.0 KB  |  94 lines

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